Skip to content

Commit

Permalink
fix: row position for collapsed rows - replace rows with flat rows (#302
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Fran McDade authored and Fran McDade committed Jan 2, 2025
1 parent 43ab245 commit 3383698
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Table/features/RowPosition/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function getRowModel<T extends RowData>(
rowModel: RowModel<T>
): RowModel<T> {
let i = 0;
rowModel.rows.forEach(({ getIsGrouped, id }) => {
rowModel.flatRows.forEach(({ getIsGrouped, id }) => {
const isGroupedRow = getIsGrouped();
const index = isGroupedRow ? -1 : i; // Capture the current value of i for this iteration.
rowModel.rowsById[id].getRowPosition = (): number =>
Expand Down

0 comments on commit 3383698

Please sign in to comment.