Skip to content

Commit ab027fb

Browse files
committed
select alll in the first load
1 parent d3f4358 commit ab027fb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/components/inspector/variables-to-submit.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,13 @@ export default {
251251
this.$emit('change', []);
252252
}
253253
},
254-
isEnabled(newValue) {
255-
if (!newValue) {
254+
isEnabled(newValue, oldValue) {
255+
if (newValue && !oldValue) {
256+
// When enabled for the first time, select all variables
257+
this.selectedVariables = [...this.availableVariables];
258+
this.$emit('input', this.selectedVariables);
259+
this.$emit('change', this.selectedVariables);
260+
} else if (!newValue) {
256261
// When disabled, clear selection to submit all variables
257262
this.selectedVariables = [];
258263
this.$emit('input', []);

0 commit comments

Comments
 (0)