Skip to content

Instantly share code, notes, and snippets.

Avatar
🤗

Edgar Manukyan armenic

🤗
  • https://www.roche.com/
  • Toronto, Canada
View GitHub Profile
@armenic
armenic / react-table-filter.js
Created Dec 27, 2020
React-table server side filtering, part 1
View react-table-filter.js
React.useEffect(() => {
fetchData({ pageIndex, pageSize });
}, [fetchData, pageIndex, pageSize, worldFilter_]);
const WorldFilter = () => {
const [value, setValue] = React.useState(worldFilter_);
const onChange = useAsyncDebounce((value) => {
setWorldFilter_(value || undefined);
}, 1000);