reactdatagrid icon indicating copy to clipboard operation
reactdatagrid copied to clipboard

🐛 The filter function is not working

Open GTLSlb opened this issue 2 years ago • 0 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

GTLSlb avatar Nov 01 '23 05:11 GTLSlb