Skip to content

Conversation

amanmahajan7
Copy link
Collaborator

This was introduced in #3774

@amanmahajan7 amanmahajan7 self-assigned this May 21, 2025
@codecov
Copy link

codecov bot commented May 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.80%. Comparing base (e80885d) to head (b791afc).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3790   +/-   ##
=======================================
  Coverage   98.80%   98.80%           
=======================================
  Files          46       46           
  Lines        3516     3518    +2     
  Branches      766      766           
=======================================
+ Hits         3474     3476    +2     
  Misses         42       42           
Files with missing lines Coverage Δ
src/Cell.tsx 100.00% <100.00%> (ø)
src/DataGrid.tsx 99.59% <100.00%> (-0.01%) ⬇️
src/GroupRow.tsx 100.00% <100.00%> (ø)
src/hooks/useRovingTabIndex.ts 100.00% <100.00%> (ø)
src/index.ts 100.00% <ø> (ø)
src/types.ts 100.00% <ø> (ø)
🚀 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.

});

selectCell(nextSelectedCellPosition);
selectCell(nextSelectedCellPosition, { shouldFocusCell: true });
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We only need to set shouldFocusCell flag on cell navigation using keyboard.

setIsChildFocused(false);
}

function onFocus(event: React.FocusEvent<HTMLDivElement>) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When a cell is clicked it is automatically focused as the cell has a tabIndex: -1. We can focus the child here

@amanmahajan7 amanmahajan7 marked this pull request as ready for review May 21, 2025 18:13
@amanmahajan7 amanmahajan7 requested a review from nstepien as a code owner May 21, 2025 18:13
nstepien
nstepien previously approved these changes May 21, 2025
Co-authored-by: Nicolas Stepien <567105+nstepien@users.noreply.github.com>
@amanmahajan7 amanmahajan7 merged commit d38b21b into main May 21, 2025
2 checks passed
@amanmahajan7 amanmahajan7 deleted the am-fix-focus branch May 21, 2025 20:22
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.

2 participants