Add deepCollapseChildren prop for allowing deeply collapsed children #131
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is implementing the same logic as in #130 but for the dev branch (Vue 3). I haven't tested this version but did test the Vue 2 version and the logic is the same.
When a user specifies a depth to be collapsed, the intention is to make the JSON tidy so it is easy to visually parse.
Currently the
deep
prop only collapses at the specific level passed, and when a user opens that depth, all children are fully open.I think this should collapse all children beyond the depth level, so that when the items are opened up the children are collapsed.
That said, for backwards compatibility I've implemented this as a new prop, defaulting to false, so that anyone upgrading won't see a change in behaviour.
I'm not sure on the naming of the prop, but feel like this would be beneficial and would resolve #125.