update meta resources when resource ref changed

This commit is contained in:
nklhrstv 2020-03-29 22:22:45 +03:00
parent 3f95d0361a
commit e61c44e76f

View file

@ -90,7 +90,7 @@ const useSelectableResource = (resourceRef, resources) => {
}, []);
React.useEffect(() => {
dispatch({ type: 'resources-changed', resourceRef, resources });
}, [resources]);
}, [resourceRef, resources]);
return [state.resourceRef, state.resources, state.selected.resource, selectResource];
};