mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-06 06:48:21 +00:00
Ensure listItem is exposed for set/unset custom variables handler (#2813)
This commit is contained in:
parent
fb3465581e
commit
fda71f04e0
1 changed files with 6 additions and 6 deletions
|
|
@ -290,26 +290,26 @@ function executeAction(_ref, event, mode, customVariables) {
|
|||
case 'set-custom-variable': {
|
||||
const key = resolveReferences(event.key, _ref.state.currentState, undefined, customVariables);
|
||||
const value = resolveReferences(event.value, _ref.state.currentState, undefined, customVariables);
|
||||
const customVariables = { ..._ref.state.currentState.variables };
|
||||
customVariables[key] = value;
|
||||
const customAppVariables = { ..._ref.state.currentState.variables };
|
||||
customAppVariables[key] = value;
|
||||
|
||||
return _ref.setState({
|
||||
currentState: {
|
||||
..._ref.state.currentState,
|
||||
variables: customVariables,
|
||||
variables: customAppVariables,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
case 'unset-custom-variable': {
|
||||
const key = resolveReferences(event.key, _ref.state.currentState, undefined, customVariables);
|
||||
const customVariables = { ..._ref.state.currentState.variables };
|
||||
delete customVariables[key];
|
||||
const customAppVariables = { ..._ref.state.currentState.variables };
|
||||
delete customAppVariables[key];
|
||||
|
||||
return _ref.setState({
|
||||
currentState: {
|
||||
..._ref.state.currentState,
|
||||
variables: customVariables,
|
||||
variables: customAppVariables,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue