Skip to content
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

fix(datatable): remove toolbar search and menu from tab order #14397

Conversation

tay1orjones
Copy link
Member

@tay1orjones tay1orjones commented Aug 4, 2023

This removes the table toolbar search and menu actions from the tab order when batch actions are open, as discussed in #14357 (comment)

Changelog

Changed

  • update Search to put ...rest after other props
  • update stories to remove TableToolbarSearch and TableToolbarMenu actions from tab order when batch action bar is open/visible

Testing / Reviewing

  • focus should move through the actions when the batch action bar is closed
  • focus should not move through the actions when the batch action bar is open
datatable.focus.batch.actions.mov

@tay1orjones tay1orjones requested a review from a team as a code owner August 4, 2023 17:11
@@ -257,6 +256,7 @@ const Search = React.forwardRef<HTMLInputElement, SearchProps>(function Search(
type={type}
value={value}
tabIndex={onExpand && !isExpanded ? -1 : undefined}
{...rest}
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure why we had this placed before all the existing props. Props passed by consumers would always be overwritten by what we had here.

It's possible this could cause some unintended effects downstream, but I don't think it's necessarily a breaking change. Thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

Is the only "unintended effect" that props users were passing and expecting to work will now actually work? 😅

Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is breaking either, more like a bug fix for something that should have been working.

@netlify
Copy link

netlify bot commented Aug 4, 2023

Deploy Preview for carbon-components-react ready!

Name Link
🔨 Latest commit cd8fb6b
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/64cd48da0641c500083a1583
😎 Deploy Preview https://deploy-preview-14397--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Aug 4, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit cd8fb6b
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/64cd48da65d30100083d9eba
😎 Deploy Preview https://deploy-preview-14397--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

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

LGTM 👍 ✅

@tw15egan
Copy link
Member

tw15egan commented Aug 4, 2023

@tay1orjones just needs updated snaps

Copy link
Member

@alisonjoseph alisonjoseph left a comment

Choose a reason for hiding this comment

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

LGTM!

@tay1orjones tay1orjones added this pull request to the merge queue Aug 4, 2023
Merged via the queue into carbon-design-system:main with commit b7abe20 Aug 4, 2023
14 checks passed
@tay1orjones tay1orjones deleted the 14357-datatable-focus-improvements branch August 4, 2023 19:59
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