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

feat(DataTable): add batch actions select all button addition #14476

Conversation

matthewgallo
Copy link
Member

@matthewgallo matthewgallo commented Aug 21, 2023

Closes #12595

This PR adds a Select all button to the TableBatchActions component if onSelectAll is passed to the component. The actual select all logic will be handled by the consumer as discussed in #12595. The main purpose of this addition is so that we can implement the following in the batch action toolbar in Carbon for IBM Products Datagrid:

Batch action toolbar with select all

Changelog

New

  • Added onSelectAll and totalCount properties to TableBatchActions
  • Added test to validate that onSelectAll is called as expected

Changed

  • I also noticed two small prop type errors that I fixed, relating to button sizes, changing small to sm in the batch action stories.

Testing / Reviewing

I have added these two new props to one of the DataTable batch action stories to view as an example and added an additional test to validate that onSelectAll is called appropriately.

@netlify
Copy link

netlify bot commented Aug 21, 2023

Deploy Preview for carbon-components-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 98e9a65
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/64e745e7a1d7fc0008363027
😎 Deploy Preview https://deploy-preview-14476--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 21, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 98e9a65
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/64e745e780085600088f3d6b
😎 Deploy Preview https://deploy-preview-14476--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
Contributor

@guidari guidari left a comment

Choose a reason for hiding this comment

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

Thanks for adding this! 🚀

@guidari guidari enabled auto-merge August 24, 2023 11:58
@guidari guidari added this pull request to the merge queue Aug 24, 2023
Merged via the queue into carbon-design-system:main with commit db61c68 Aug 24, 2023
14 checks passed
@matthewgallo matthewgallo deleted the 12595-batch-acitons-select-all-button-addition branch August 24, 2023 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: request to add "Select all" to TableBatchActions component
4 participants