Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deepCollapseChildren prop for allowing deeply collapsed children #131

Merged
merged 3 commits into from
Aug 28, 2021
Merged

Add deepCollapseChildren prop for allowing deeply collapsed children #131

merged 3 commits into from
Aug 28, 2021

Conversation

fredrivett
Copy link
Contributor

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.

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.
Let the user know about the new prop for collapsing all children at the level below the `deep` prop passed.
This is a new option provided for collapsing children inside those
collapsed by default, so is exposed here
@fredrivett
Copy link
Contributor Author

Have added to the demo, but not tested it out yet.

@leezng leezng merged commit 8ab97d6 into leezng:dev Aug 28, 2021
@JohnCampionJr
Copy link

@leezng Could I trouble you for a release to NPM with this feature included?

@leezng
Copy link
Owner

leezng commented Nov 5, 2021

@JohnCampionJr #143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand on root level expands all childs
3 participants