Skip to content

Commit

Permalink
use regex to extract expression
Browse files Browse the repository at this point in the history
  • Loading branch information
anserwaseem committed Sep 12, 2024
1 parent 39b6818 commit 23d0740
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/runtime/src/widgets/DataGrid/DataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ export const DataGrid: React.FC<GridProps> = (props) => {
setRowsKey(selectedKeys);

const keyField =
itemTemplate.key?.replace("$", "").replace("{", "").replace("}", "") ||
"";
// eslint-disable-next-line prefer-named-capture-group
itemTemplate.key?.replace(/^\$\{(.*)\}$/, "$1") || ""; // replace "${...}" or '${...}' with ...

const selectedRows = compact(
namedData.map((row) => {
Expand Down

0 comments on commit 23d0740

Please sign in to comment.