Skip to content

Commit b144261

Browse files
committed
Add missing onCheck argument in TypeScript definition
Resolves #208.
1 parent 67bf0db commit b144261

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.d.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ declare module "react-checkbox-tree" {
1212
title?: string;
1313
}
1414

15+
interface OnCheckNode extends Node {
16+
checked: boolean;
17+
}
18+
1519
interface Icons {
1620
check?: React.ReactNode;
1721
uncheck?: React.ReactNode;
@@ -53,7 +57,7 @@ declare module "react-checkbox-tree" {
5357
showExpandAll?: boolean;
5458
showNodeIcon?: boolean;
5559
showNodeTitles?: boolean;
56-
onCheck?: (checked: Array<string>) => void;
60+
onCheck?: (checked: Array<string>, node: OnCheckNode) => void;
5761
onClick?: (event: { checked: boolean, value: any }) => void;
5862
onExpand?: (expanded: Array<string>) => void;
5963
}

0 commit comments

Comments
 (0)