Skip to content

Comments

Move row focus logic to <TreeGrid />, add renderSummaryRow#3976

Open
amanmahajan7 wants to merge 5 commits intomainfrom
am-treegrid
Open

Move row focus logic to <TreeGrid />, add renderSummaryRow#3976
amanmahajan7 wants to merge 5 commits intomainfrom
am-treegrid

Conversation

@amanmahajan7
Copy link
Collaborator

No description provided.

@amanmahajan7 amanmahajan7 self-assigned this Feb 23, 2026
@amanmahajan7 amanmahajan7 changed the title Move row selection logic to TreeGrid, add renderSummaryRow Move row focus logic to <TreeGrid />, add renderSummaryRow Feb 23, 2026
isTreeGrid: boolean;
}

export interface RenderSummaryRowProps<TRow, TSummaryRow = unknown> extends Pick<
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we extend div props?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure

isRowSelectionDisabled: _isRowSelectionDisabled,
...props
}: GroupRowRendererProps<R, SR>) {
const isPositionOnRow = selectedCellIdx === -1;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it for now as we do not focus on the header row

@amanmahajan7 amanmahajan7 marked this pull request as ready for review February 23, 2026 17:02
@codecov-commenter
Copy link

codecov-commenter commented Feb 23, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.55%. Comparing base (793929e) to head (94ae711).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3976   +/-   ##
=======================================
  Coverage   97.54%   97.55%           
=======================================
  Files          36       36           
  Lines        1467     1471    +4     
  Branches      472      473    +1     
=======================================
+ Hits         1431     1435    +4     
  Misses         36       36           
Files with missing lines Coverage Δ
src/DataGrid.tsx 98.98% <100.00%> (+<0.01%) ⬆️
src/GroupRow.tsx 100.00% <ø> (ø)
src/HeaderRow.tsx 100.00% <ø> (ø)
src/Row.tsx 100.00% <ø> (ø)
src/SummaryRow.tsx 100.00% <ø> (ø)
src/TreeDataGrid.tsx 94.62% <100.00%> (+0.24%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

import GroupedRow from './GroupRow';
import { defaultRenderRow } from './Row';
import { rowFocusable, rowSelectedClassname } from './style/row';
import SummaryRowComponent from './SummaryRow';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import SummaryRowComponent from './SummaryRow';
import SummaryRow from './SummaryRow';

isTreeGrid: boolean;
}

export interface RenderSummaryRowProps<TRow, TSummaryRow = unknown> extends Pick<
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure

renderRow?: Maybe<(key: Key, props: RenderRowProps<TRow, TSummaryRow>) => ReactNode>;
renderSummaryRow?: Maybe<
(key: Key, props: RenderSummaryRowProps<TRow, TSummaryRow>) => ReactNode
>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's document all the user-facing changes in the README

bottom: number | undefined;
lastFrozenColumnIndex: number;
selectedCellIdx: number | undefined;
isTop: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove isTop in favor of checking top/bottom?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants