diff options
author | dizzy <diosmosis@users.noreply.github.com> | 2022-05-30 06:05:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-30 06:05:10 +0300 |
commit | e18d5e0fdec4d6927a8688f6d8db49cca6360a87 (patch) | |
tree | 37de5b1347e9f325724d97cc870312e8d9e994ff /plugins/SegmentEditor/vue/src | |
parent | c75dcf71b75d1112e3e00fda602fd0e7a17a54f7 (diff) |
[Vue] reset segment state before update:modelValue… (#19276)
* reset segment state before update:modelValue so the parent component can decide to let the change go through
* fix test (make sure to wait after each individual change for vue logic to execute completely)
* fix another multiple input val change in UI test
Diffstat (limited to 'plugins/SegmentEditor/vue/src')
-rw-r--r-- | plugins/SegmentEditor/vue/src/SegmentGenerator/SegmentGenerator.vue | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/SegmentEditor/vue/src/SegmentGenerator/SegmentGenerator.vue b/plugins/SegmentEditor/vue/src/SegmentGenerator/SegmentGenerator.vue index 830a9bc524..b278d9a36c 100644 --- a/plugins/SegmentEditor/vue/src/SegmentGenerator/SegmentGenerator.vue +++ b/plugins/SegmentEditor/vue/src/SegmentGenerator/SegmentGenerator.vue @@ -286,6 +286,9 @@ export default defineComponent({ }, segmentDefinition(newVal) { if (newVal !== this.modelValue) { + // reset state so update:modelValue can cancel the change + this.setSegmentString(this.modelValue); + this.$emit('update:modelValue', newVal); } }, |