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

[IndexTable] Show select all action when using a table with no bulk actions #11669

Closed
mrcthms opened this issue Feb 28, 2024 · 0 comments · Fixed by #11670
Closed

[IndexTable] Show select all action when using a table with no bulk actions #11669

mrcthms opened this issue Feb 28, 2024 · 0 comments · Fixed by #11670
Assignees

Comments

@mrcthms
Copy link
Contributor

mrcthms commented Feb 28, 2024

When using the IndexTable in Polaris, currently if you want to have the action saying "Select all X+ customers", you have to provide a bulkActions prop. This doesn't make sense, as we support tables without bulk actions, and there is no relationship between selecting all resources, and the presence of bulk actions.

It should be possible to show the "Select all X+ customers" action without relying on the presence of the bulkActions prop.

@mrcthms mrcthms self-assigned this Feb 28, 2024
mrcthms added a commit that referenced this issue Feb 29, 2024
…ing to provide bulkActions prop (#11670)

### WHY are these changes introduced?

Fixes #11669

When using the IndexTable in Polaris, currently if you want to have the
action saying "Select all X+ customers", you have to provide a
`bulkActions` prop. This doesn't make sense, as we support tables
without bulk actions, and there is no relationship between selecting all
resources, and the presence of bulk actions.

It should be possible to show the "Select all X+ customers" action
without relying on the presence of the `bulkActions` prop.

### WHAT is this pull request doing?

Removes the need for `bulkActions` prop on the IndexTable to show the
"Select all X+ customers" action.

### How to 🎩

🖥 [Local development
instructions](https://github.com/Shopify/polaris/blob/main/README.md#install-dependencies-and-build-workspaces)
🗒 [General tophatting
guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md)
📄 [Changelog
guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog)

Spin URL (remove bulk actions from Products index to show that the
select all action is present):
https://admin.web.index-table-select-all-action.marc-thomas.eu.spin.dev/store/shop1/products?selectedView=all

### 🎩 checklist

- [x] Tested a
[snapshot](https://github.com/Shopify/polaris/blob/main/documentation/Releasing.md#-snapshot-releases)
- [x] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [x] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [x] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [x] Updated the component's `README.md` with documentation changes
- [x] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide
@ouellettejordan ouellettejordan changed the title [IndexTable] Allow paginated select all action text to be visible when using a table with no bulk actions [IndexTable] Show select all action when using a table with no bulk actions Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant