π The filter function is not working
GTLSlb opened this issue Β· comments
- what edition are you using - community
- version for
@inovua/reactdatagrid-community
Relevant code or config
const onSelectionChange = useCallback(
({ selected }) => {
if (selected === true) {
const filteredData = filter(tableData, filters, columnsElements);
if (filteredData.length != tableData.length) {
setSelected(filteredData);
setSelectedRows(selected);
} else if (tableData) {
setSelected(tableData);
setSelectedRows(selected);
}
} else {
setSelected(selected);
setSelectedRows(selected);
}
},
[filters]
);
The filter function provided by the library itself, is not working when I dont pass columnsElements it return this error:
Uncaught TypeError: Cannot read properties of undefined (reading 'dateFormat')
And when I add the columns in the filter function it returns no data