T
TanStack2y ago
graceful-beige

Custom filter makes built in filter not work

I have this columns in react-table v7, one with a custom filter and another with a 'between' filter. When I use the custom filter, the 'between' filter stop working. Any ideias why and how to fix it? function multiSelectFilter(rows, columnIds, filterValues) { return filterValues.length === 0 ? rows : rows.filter((row) => { const cellValue = String(row.original[columnIds]).toLowerCase(); return filterValues.some((filterValue) => cellValue.includes(filterValue)); }); } const adminColumns = [{ Header: 'Nome', accessor: 'name', filter: multiSelectFilter, }, { Header: 'Instituição', accessor: 'company' }, { Header: 'Latitude', accessor: 'lat', filter: 'between', Cell: ({ value }) => Number(value).toFixed(2) }]
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?