Skip to content

Commit

Permalink
fix(editor): Update to 'Expression/Fixed' toggle - Keep expression wh…
Browse files Browse the repository at this point in the history
…en switching to Fixed (#4599)

✨ Keep the expression string when switching to `Fixed` parameter value
  • Loading branch information
MiloradFilipovic authored Nov 15, 2022
1 parent 531a290 commit 6eee155
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/editor-ui/src/components/ParameterInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,14 @@ export default mixins(
if (this.isResourceLocatorParameter && isResourceLocatorValue(this.value)) {
this.valueChanged({ __rl: true, value, mode: this.value.mode });
} else {
this.valueChanged(typeof value !== 'undefined' ? value : null);
let newValue = typeof value !== 'undefined' ? value : null;
if (this.parameter.type === 'string') {
// Strip the '=' from the beginning
newValue = this.value ? this.value.toString().substring(1) : null;
}
this.valueChanged(newValue);
}
} else if (command === 'refreshOptions') {
if (this.isResourceLocatorParameter) {
Expand Down

0 comments on commit 6eee155

Please sign in to comment.