Skip to content

Commit 70961e6

Browse files
committed
fix(findNodeById): allow number
1 parent 2d018f8 commit 70961e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/util/tree/findNodeById.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { TableNode } from '@table-library/react-table-library/types/table';
22

3-
export const findNodeById = <T extends TableNode>(nodes: T[], id: string): T | null =>
3+
export const findNodeById = <T extends TableNode>(nodes: T[], id: string | number): T | null =>
44
nodes.reduce((acc: T | null, value: T): T | null => {
55
if (acc) return acc;
66

0 commit comments

Comments
 (0)