How to replicate custom selection header of Shopify orders page

The Shopify orders page uses a custom selection header with a dropdown menu to select all orders on the page or all orders of the store.

I would like to replicate this behavior with Polaris React in my application but after hours of tries I do not manage to get the same slick experience.

It would be amazing if someone can help me at Shopify or maybe outside Shopify if one us already did this implementation.

Below two screenshots to illustrate what I’m talking about:

With the dropdown menu close

With the dropdown menu open

This can be done using Index Filters.

It looks like I miss something.

I believed IndexFilters are the right solution to create the “All”, “Unfulfilled”, “Paid” filters.

I’m talking about the line containing the checkbox to select all elements on the page.
Are IndexFilters the right solution for this line too ?

This line in the red rectangle:

@Luke Is there a plan to make this doable with the Polaris web components? The s-table component is quite sparse. It has a filters slot that goes in above the headers but it seems like it could use another one that would replace the header row like what’s done in IndexFilters.

Copying @Anthony_Frehner who maybe is tracking my long list of s-table feature parity requests.

No idea, I don’t work for Shopify so can’t comment on that.

I’ll make a new thread as it’s probably best as it’s own topic.

I’m sorry but I still don’t understand how it is possible to copy the behaviour of the Shopify’s order page with the React version of the components.

I’m talking about replacing the headers with a custom component when an item is selected.

Do you guys, please, have a code sample somewhere to help me on that point?

I don’t have a custom component for it, but the IndexFilters component takes props for actions and for managing selection state (like selecting everything on all pages) that it puts over the header row when things are selected. So you don’t control the component that replaces the header row, but you do define elements that go there.

Take a look at this example: Index table — Shopify Polaris React

1 Like