mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
feat: datatables pagination.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user