-
Notifications
You must be signed in to change notification settings - Fork 137
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataGrid filter panel only filter for current loaded data. #3346
Comments
Hey @seonyukim , can you show us an example of how you would like to manually filter the data? You can currently do this by passing in a setAllFilters hook |
That was enabled in this PR |
@AlexanderMelox Can you check this Slack thread? We posted what we wanted and how we use setAllFilters and that is not working |
The slack thread isn't working for me, I'm not in the IBM Security workspace. May you take screen shots? |
oops I forgot to add thread link https://ibm-security.slack.com/archives/C013ZTX0N6B/p1689602026794799 |
We us React table v7 under the hood. And this is the setAllFilters hooks they provide. https://github.com/TanStack/table/blob/v7/docs/src/pages/docs/api/useFilters.md#instance-properties |
Basically, we don't load all the data into a table at once. We have millions of data in some cases. We load the first set of data(first page) with pagination. If we do the filter only on the loaded data, this is useless in our case. |
@matthewgallo would you have any input on this? |
Hi all, const datagridState = useDatagrid({
columns,
data,
...,
manualFilters: true,
manualSortBy: true,
}, useFilters)
const {
state: {
sortBy,
filters
}
} = datagridState; |
@seonyukim Check @xmannyxfreshx1 comment, someone else had this issue and they were able to get it to work 🚀 |
@AlexanderMelox: For clarity... the supported solution will be the snippet provided by @xmannyxfreshx1? Will this be documented formally? (FYI @seonyukim, we'll discuss on your return.) |
What package(s) are you using?
Detailed description
DataGrid filtering does this all internally on the data provided. We grab data per page, so this filter would only filter the current page of data. Is there a way to:
yes, DataGrid component
Be able to use filter data in the api layer (detail is above)
V2.4.0
CP4S QRadar suit. We were waiting for the filter panel long time. Without this functionality, the filter panel is useless to us. We need this functionality as soon as possible.
Steps to reproduce the issue
Additional information
Here is the slack message: https://ibm-security.slack.com/archives/C013ZTX0N6B/p1689602026794799
The text was updated successfully, but these errors were encountered: