feat: datatables pagination.

This commit is contained in:
Ahmed Bouhuolia
2020-11-16 13:36:14 +02:00
parent 6d4b3164a8
commit 13dd14b9d4
76 changed files with 1160 additions and 1315 deletions

View File

@@ -21,6 +21,20 @@ export function useUpdateEffect(effect, dependencies = []) {
}, dependencies);
}
export function useIsValuePassed(value, compatatorValue) {
const cache = useRef([value]);
useEffect(() => {
if (cache.current.indexOf(value) === -1) {
cache.current.push(value);
}
}, [value]);
return cache.current.indexOf(compatatorValue) !== -1;
}
export default {
useAsync,
useUpdateEffect,