Unverified Commit c305eb21 authored by Guilherme Gazzo's avatar Guilherme Gazzo Committed by GitHub
Browse files

fix: actionId on action hooks (#149)

parent fe913dc4
......@@ -24,12 +24,12 @@ export const useBlockContext = ({ blockId, actionId, appId, initialValue }, cont
setLoading(true);
await action({ blockId, appId: appId || appIdFromContext, actionId, value, viewId });
setLoading(false);
}, []);
}, [actionId, blockId]);
const stateFunction = useCallback(async ({ target: { value } }) => {
setValue(value);
await state({ blockId, appId, actionId, value });
}, []);
}, [actionId, blockId]);
if ([BLOCK_CONTEXT.SECTION, BLOCK_CONTEXT.ACTION].includes(context)) {
return [{ loading, setLoading, error }, actionFunction];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment