-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Toggle component tree recursively with alt key pressed #265
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
Conversation
posva
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just some style changes
| <span class="arrow-wrapper" | ||
| v-if="instance.children.length" | ||
| @click.stop="toggle()"> | ||
| @click.stop="toggle($event)"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the event is passed implicitly. You can just remove the ()
| this.$store.dispatch('components/toggleInstance', { | ||
| instance: this.instance, | ||
| expanded: val, | ||
| recursive: recursive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simply recursive would do
|
|
||
| const actions = { | ||
| toggleInstance ({commit, dispatch}, {instance, expanded, recursive}) { | ||
| commit('TOGGLE_INSTANCE', {id: instance.id, expanded: expanded}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simply expanded would do
| instance.children.forEach((child) => { | ||
| dispatch('toggleInstance', { | ||
| instance: child, | ||
| expanded: expanded, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as others
|
@posva I updated to conform to your requests and force pushed to not pollute history with unnecessary commits :) hope it's all okay now |
posva
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @yyx990803
|
Thanks! |
Once application grows, it becomes irritating to have to click component by component to expand the tree. Following Chrome's convention (as pointed by @kaleb) I added support for toggling the tree recursively if 'alt' key is pressed during toggle.
I also think it's high time for 'Settings' tab to be able to customize Devtool's behaviour. E.g. for example I'd like to start with component tree fully expanded but I guess I'll just submit Feature request