-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Table] Show focus cell appropriately when enableFocus becomes true #1447
Conversation
Show focus cell appropriately when enableFocus becomes truePreview: documentation | table |
packages/table/src/table.tsx
Outdated
} else { | ||
// focus the top-left cell of the table | ||
newFocusedCellCoordinates = { col: 0, row: 0, focusSelectionIndex: 0 }; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be nice to pull this out to getInitialFocusCell
helper that simply returns in each if
instead of assigning to a let
variable?
then it's just const newFocusedCellCoordinates = this.getInitialFocusCell(args);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like it's time to introduce focusUtils.ts
(per https://github.com/palantir/blueprint/pull/1496/files#r135396325). 😎
Oops, delete .onlyPreview: documentation | table |
@@ -0,0 +1,3 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs file header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Add missing file headerPreview: documentation | table |
Fixes #1443
Checklist
Changes proposed in this pull request:
Table
enableFocus
prop totrue
now shows a focused cell right away.Reviewers should focus on:
Screenshot