Open massiws opened 1 year ago
After the independent node selection feature, this becomes rather important. Although, how would you include this in the UI?
@massiws and @dotgourav, I can implement the next behavior: I will show all nodes which have a check icon. So if we click England -> England, London, Chelsea, West End, Brighton. if we use a situation like on screenshot -> London, Chelsea, West End. But if I click London off, we will unclick all children, and the input will be empty. It looks strange or not? What do you think? Because I didn't see a behavior like this before. I see only grouped: true/false behavior, and It was implemented. What about grouped prop - Show groups in the input and group leafs if all groups selected. You can set this prop to false. And you will see only children without groups name. Can it work for you or not?
Thank you @dipson88!
Thinking treeselectjs
in a search bar maybe could be a real scenario:
The grouped
option (in my opinion) has a different funcionality.
Hope this make sense.
@dipson88 any updates?
@massiws, sorry no updates. Your request make sense, but I faced problems, the code became more hard-readable. The problem is related to the input/list communication: when selected 3 nodes (1 parent and 2 children), I unselect the child, but my algorithm checked that parent was still selected, and he runs through the list and checked all children and set partial checked or checked for his parents. I guess if implement this feature, I need to rewrite the whole algorithm, but It is not a nice decision, or use a hard-readable code, and in the future, it will be hard supported. Looks like it is a huge task with refactoring, and maybe I need to change the group and isGroupedValue props behavior. isIndependentNodes prop was possible to implement because I just don't use the child/parent algorithm for this behavior. In the future, I'm going to resolve this task, but now it looks like a too hard to implement.
In the default props config, when selecting the parent item ONLY parent is selected:
Version 0.9.0 allow nodes to be selected independently, but this require to click each node, hard work if there are many children.
It would be very useful having an option (something like
allTree
) to allow add parent AND all its children when the parent is selected.Thank you.