Skip to content

Commit dcaa51c

Browse files
committed
feat: state inspector: collapse all with shift too
1 parent a054381 commit dcaa51c

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

packages/app-frontend/src/features/inspector/StateInspector.vue

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,16 @@ export default {
8686
methods: {
8787
toggle (dataType, currentExpanded, event = null) {
8888
if (event) {
89-
if (event.ctrlKey || event.metaKey) {
90-
this.setExpandToAll(false)
91-
this.$emit('collapse-all')
92-
return
93-
} else if (event.shiftKey) {
94-
this.setExpandToAll(true)
95-
this.$emit('expand-all')
96-
return
89+
if (event.shiftKey) {
90+
if (currentExpanded) {
91+
this.setExpandToAll(false)
92+
this.$emit('collapse-all')
93+
return
94+
} else {
95+
this.setExpandToAll(true)
96+
this.$emit('expand-all')
97+
return
98+
}
9799
}
98100
}
99101
Vue.set(this.expandedState, dataType, !currentExpanded)

packages/app-frontend/src/locales/en.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default {
2424
},
2525
StateInspector: {
2626
dataType: {
27-
tooltip: '[[{{keys.ctrl}}]] + <<mouse>>: Collapse All<br>[[{{keys.shift}}]] + <<mouse>>: Expand All',
27+
tooltip: '[[{{keys.shift}}]] + <<mouse>>: Expand/Collapse All',
2828
},
2929
filter: {
3030
tooltip: '[[{{keys.alt}}]] + [[D]] Filter state by name',

0 commit comments

Comments
 (0)