Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 The filter function is not working #393

Open
GTLSlb opened this issue Nov 1, 2023 · 0 comments
Open

馃悰 The filter function is not working #393

GTLSlb opened this issue Nov 1, 2023 · 0 comments

Comments

@GTLSlb
Copy link

GTLSlb commented Nov 1, 2023

  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant