jakezatecky / react-checkbox-tree

A simple and elegant checkbox tree for React.

Home Page:https://jakezatecky.github.io/react-checkbox-tree/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

onCheck not working

mxy2316868975javascript opened this issue · comments

commented

<CheckboxTree
icons={icons}
nodes={nodeTree}
iconsClass={'lh'}
checked={checked}
expanded={expanded}
showNodeIcon={false}
onClick={targetNode => {
console.log(targetNode);
}}
onCheck={checked => {
console.log(1);
setChecked(checked);
onChange(checked);
}}
onExpand={expanded => {
console.log('expanded', expanded);
setExpanded(expanded);
}}
/>
image

commented

image

Can you post a link to a simplified version of the issue you have? Without seeing the rest of the code, I cannot infer what setChecked and onChange do.

You can modify this CodeSandbox reference point to create a working example.

Closing due to lack of activity. Please re-open if you still have issues.