Open edencorbin opened 3 weeks ago
Hey there! 👋
Thank you for bringing this issue to my attention! 😊
I will update the test cases to cover this scenario. Instead of patching the tree data to remove empty children, as suggested in your workaround, I believe it would be more elegant to address this directly within the tree check/uncheck logic. I'll look into implementing a fix for this in the core logic itself.
Could you please update your issue description with the version of the react-native-tree-multi-select
module you are using? This will help me ensure compatibility and proper testing.
Thanks again for your valuable feedback! 🙏
Is your feature request related to a problem? Please describe. I was getting weird behavior, checking sort-of working but unable to un-check, when there were empty arrays of children, if I recursively delete any empty arrays of "children" attributes it works as intended, the library should gracefully handle an empty array.
Describe the solution you'd like The library should handle no "children" attribute just as well / the same as an empty array children.
Describe alternatives you've considered I had to add this to my function:
Screenshots or screen records NA
Additional context NA
Would you like to work on this feature? Potentially, havn't really dug into the code yet.