fix(editor): Update to 'Expression/Fixed' toggle - Keep expression when switching to Fixed (#4599)

 Keep the expression string when switching to `Fixed` parameter value
This commit is contained in:
Milorad FIlipović 2022-11-15 13:55:53 +01:00 committed by GitHub
parent 531a290fad
commit 6eee155ecb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {