We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d018f8 commit 70961e6Copy full SHA for 70961e6
src/common/util/tree/findNodeById.ts
@@ -1,6 +1,6 @@
1
import { TableNode } from '@table-library/react-table-library/types/table';
2
3
-export const findNodeById = <T extends TableNode>(nodes: T[], id: string): T | null =>
+export const findNodeById = <T extends TableNode>(nodes: T[], id: string | number): T | null =>
4
nodes.reduce((acc: T | null, value: T): T | null => {
5
if (acc) return acc;
6
0 commit comments