mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
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:
parent
531a290fad
commit
6eee155ecb
|
@ -1013,7 +1013,14 @@ export default mixins(
|
||||||
if (this.isResourceLocatorParameter && isResourceLocatorValue(this.value)) {
|
if (this.isResourceLocatorParameter && isResourceLocatorValue(this.value)) {
|
||||||
this.valueChanged({ __rl: true, value, mode: this.value.mode });
|
this.valueChanged({ __rl: true, value, mode: this.value.mode });
|
||||||
} else {
|
} 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') {
|
} else if (command === 'refreshOptions') {
|
||||||
if (this.isResourceLocatorParameter) {
|
if (this.isResourceLocatorParameter) {
|
||||||
|
|
Loading…
Reference in a new issue