Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
* origin/develop:
  fix: actionId on action hooks (#149)
  v0.2.0 (#150)
  • Loading branch information
ggazzo committed Feb 17, 2020
2 parents c200e8a + c305eb2 commit c3d6e0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/fuselage-ui-kit/src/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit c3d6e0e

Please sign in to comment.