react-checkbox-tree icon indicating copy to clipboard operation
react-checkbox-tree copied to clipboard

version 1.6.0 doesn't update State "checked" but version 1.5.1 does

Open nour-sidaoui opened this issue 4 years ago • 4 comments

Tree items are rendered as "all-checked" and clicking their checkboxes doesn't change their state

I found that the example sandbox works perfectly fine (on version 1.5.1) However, version 1.6.0 does recreate the bug. CodeSandbox snippet (set on v1.5.1).

I've been trying to make that work on my local machine by copying / pasting the code and installing the exact same dependencies without success.

Please help!

nour-sidaoui avatar Feb 11 '21 16:02 nour-sidaoui

finally solved it! I had leaf-items (items that have no children) having an empty array as children: children: [] I removed it and everything works fine... on all versions :)

nour-sidaoui avatar Feb 12 '21 08:02 nour-sidaoui

@nour-sidaoui
That's too worked for me. I was stuck for 2 hours and was not able to figure out the issue... Thanks for figuring it out.

piyushprince346 avatar Aug 12 '21 08:08 piyushprince346

Same here, thanks a lot.

If someone is doing something like this : image

davidramos-om avatar Sep 09 '21 01:09 davidramos-om

I was stuck on this for a while too! Removing empty children arrays fixed the checkbox issue for me.

ethanmoss avatar Nov 10 '21 16:11 ethanmoss