diff --git a/packages/react-material-ui/src/modules/crud/index.tsx b/packages/react-material-ui/src/modules/crud/index.tsx index b777da70..af33b8bf 100644 --- a/packages/react-material-ui/src/modules/crud/index.tsx +++ b/packages/react-material-ui/src/modules/crud/index.tsx @@ -131,16 +131,16 @@ const CrudModule = (props: ModuleProps) => { isPending, refresh, } = useTableReturn; - const { refreshTable, dispatch } = useCrudControls(); + const { dispatch } = useCrudControls(); useEffect(() => { - if (!refreshTable && refresh && dispatch) { + if (refresh && dispatch) { dispatch({ type: ControlsActionEnum.ASSIGN_REFRESH_TABLE, payload: refresh, }); } - }, [refresh]); + }, [tableQueryState]); useEffect(() => { if (dispatch) {