Skip to content

Commit

Permalink
fix: empty filterRowModel flatRows when filtering from leaf rows (#5049)
Browse files Browse the repository at this point in the history
Co-authored-by: Günter Manz <[email protected]>
  • Loading branch information
retnag and Günter Manz authored Sep 6, 2023
1 parent 9ef186f commit 1049c20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/table-core/src/utils/filterRowsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,22 @@ export function filterRowModelFromLeafs<TData extends RowData>(
if (filterRow(row) && !newRow.subRows.length) {
rows.push(row)
newFilteredRowsById[row.id] = row
newFilteredRowsById[i] = row
newFilteredFlatRows.push(row)
continue
}

if (filterRow(row) || newRow.subRows.length) {
rows.push(row)
newFilteredRowsById[row.id] = row
newFilteredRowsById[i] = row
newFilteredFlatRows.push(row)
continue
}
} else {
row = newRow
if (filterRow(row)) {
rows.push(row)
newFilteredRowsById[row.id] = row
newFilteredRowsById[i] = row
newFilteredFlatRows.push(row)
}
}
}
Expand Down

0 comments on commit 1049c20

Please sign in to comment.