Skip to content

Commit bfa21eb

Browse files
committed
requested changes
1 parent 8e39a7c commit bfa21eb

File tree

1 file changed

+3
-3
lines changed
  • packages/main/src/components/AnalyticalTable

1 file changed

+3
-3
lines changed

packages/main/src/components/AnalyticalTable/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export interface TableProps extends CommonProps {
106106
tableHooks?: PluginHook<any>[];
107107
subRowsKey?: string;
108108
/**
109-
* The key must consist of a valid `rowId` like `{ 2: true }` or `{ ['0.2.0']: true }` for nested rows.
109+
* The key must consist of a valid `rowId` like `{ 2: true }` or `{ '0.2.0': true }` for nested rows.
110110
*/
111111
selectedRowIds?: { [key: string]: boolean };
112112
isTreeTable?: boolean;
@@ -272,9 +272,9 @@ const AnalyticalTable: FC<TableProps> = forwardRef((props: TableProps, ref: Ref<
272272

273273
useEffect(() => {
274274
toggleAllRowsSelected(false);
275-
const validChars = /^[0-9.]+$/;
275+
const validChars = /^(\d\.)*\d$/;
276276
for (const row in selectedRowIds) {
277-
if (row.match(validChars)) {
277+
if (validChars.test(row)) {
278278
toggleRowSelected(row, selectedRowIds[row]);
279279
}
280280
}

0 commit comments

Comments
 (0)