Skip to content

Commit 4394c7f

Browse files
Williangalvanipatrickelectric
authored andcommitted
InlineParameterEditor: keep input in sync with param after first edit
Sync internal_new_value from param_value whenever it changes, so slider updates are reflected in the inline editor. Only skip sync when an ack for a previous value arrives while the user has typed a different value.
1 parent bacd0c3 commit 4394c7f

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

core/frontend/src/components/parameter-editor/InlineParameterEditor.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,16 @@ export default Vue.extend({
207207
},
208208
param_value() {
209209
this.updateSelectedFlags()
210-
if (this.last_sent_value === undefined) {
211-
this.internal_new_value = this.param_value
212-
this.internal_new_value_as_string = String(this.internal_new_value)
210+
if (
211+
this.last_sent_value !== undefined
212+
&& this.internal_new_value !== this.last_sent_value
213+
&& this.param_value === this.last_sent_value
214+
&& this.param_value === this.last_sent_value
215+
) {
216+
return
213217
}
218+
this.internal_new_value = this.param_value
219+
this.internal_new_value_as_string = String(this.internal_new_value)
214220
},
215221
},
216222
mounted() {

0 commit comments

Comments
 (0)