upd : modal filter
Deskripsi: - update refresh modal filter saat ada perubahan data grup No Issues
This commit is contained in:
@@ -33,6 +33,7 @@ export default function ModalFilter({ open, close, page, category }: Props) {
|
||||
const { token, decryptToken } = useAuthSession()
|
||||
const dispatch = useDispatch()
|
||||
const entities = useSelector((state: any) => state.filterGroup)
|
||||
const update = useSelector((state: any) => state.groupUpdate)
|
||||
const [chooseGroup, setChooseGroup] = useState('')
|
||||
|
||||
async function handleLoad() {
|
||||
@@ -42,10 +43,8 @@ export default function ModalFilter({ open, close, page, category }: Props) {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (entities.length == 0) {
|
||||
handleLoad()
|
||||
}
|
||||
}, [dispatch]);
|
||||
}, [dispatch, update]);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user