mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
fix dropdown select option function stale closure
This commit is contained in:
parent
09ddcf7910
commit
786024629c
1 changed files with 10 additions and 0 deletions
|
|
@ -145,6 +145,16 @@ export const DropDown = function DropDown({
|
|||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const exposedVariables = {
|
||||
selectOption: async function (value) {
|
||||
selectOption(value);
|
||||
},
|
||||
};
|
||||
|
||||
setExposedVariables(exposedVariables);
|
||||
}, [JSON.stringify(properties.values)]);
|
||||
|
||||
useEffect(() => {
|
||||
let newValue = undefined;
|
||||
let index = null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue