Unverified Commit c3d6e0e9 authored by Guilherme Gazzo's avatar Guilherme Gazzo
Browse files

Merge remote-tracking branch 'origin/develop'

* origin/develop:
  fix: actionId on action hooks (#149)
  v0.2.0 (#150)
parents c200e8a0 c305eb21
......@@ -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