mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(toolbar-search): re-filter rows if DataTable
rows change (#2154)
Fixes #2143 Make `ToolbarSearch` filtering reactive to `DataTable` rows. Previously, `ToolbarSearch` did not update when `DataTable` rows changed. Now it subscribes to the context rows and re-runs `filterRows` in `afterUpdate` to prevent infinite loops.
This commit is contained in:
parent
b034378277
commit
f09c2e2c31
2 changed files with 27 additions and 4 deletions
|
@ -182,8 +182,7 @@ describe("DataTableSearch", () => {
|
|||
});
|
||||
});
|
||||
|
||||
// TODO: fix reactivity
|
||||
it.skip("re-filters rows when toggled", async () => {
|
||||
it("re-filters rows when toggled", async () => {
|
||||
render(DataTableSearch);
|
||||
|
||||
allRowsRendered();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue