-
Notifications
You must be signed in to change notification settings - Fork 142
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
Filtering and Search in Datagrid with nested rows is not working as expected #4652
Comments
Any chance this is possible without having to upgrade to V8 of That said it is a slightly weird way to filter a row that has success, but child that failed. |
We are using data-grid in IBM product and we are facing a similar issue in search with data-grid with nested rows. If a row is shown in search result and search value gets cleared, then only the parent row gets restored but the nested rows are not restored. It could be reproduced in the storybook itself(https://ibm-products.carbondesignsystem.com/?path=/story/ibm-products-components-datagrid-nestedrows--nested-rows-usage-story) as shown below, I believe, it will get fixed once the issue posted by Original Poster gets fixed. So, could some one please let me know about the ETA for providing a fix for this issue ? |
Link to Stackblitz provided by @lee-chase |
Hi Team, |
Unfortunately this stems from the version (v7.x.x) of A workaround does exist however, by adding a const NestedRows = () => {
const columns = React.useMemo(() => defaultHeader, []);
const [data] = useState([]); // data
const datagridState = useDatagrid(
{
columns,
data,
DatagridActions,
getSubRows: (row) => row.subRows, // adding this property makes the subRows visible again after search/global filter is removed
},
useNestedRows
);
return <Datagrid datagridState={datagridState} />;
}; |
@matthewgallo is there a workaround to make the search consider the nested rows content as welll ? |
I'm attaching a video with most recent behavior which is not fully correct (We can't search for nested rows): TEST.mov |
Hey @Xirax , could you please open a new issue for the missing behavior? Thank you! |
If issue still exists, we can use the new issue for any missing behavior. |
If we apply filter in datagrid, its not filtering from nested rows (but sorting and pagination works)
used useFiltering hook, (tested in chrome)
when we click clear filter also its not listing all data back from nested rows
search also not fetching data from nested rows
The text was updated successfully, but these errors were encountered: