How to make an Index Table not selectable?

jt274
Shopify Partner
11 1 4

I'm looking for a way to make a Polaris Index Table not selectable (no check boxes). There is a property called "selectable", but setting it false or true makes no difference.

The Resource List also has a selectable property that does toggle the check boxes, but I want the layout and features of the Index Table.

0 Likes
achieveapplabs
Shopify Partner
497 39 78

Are you using BulkActions in your component? Says here selectable prop is: "For use when bulkActions aren't provided."

Using the true/false toggle on https://polaris.shopify.com/components/lists-and-tables/resource-list#navigation seems to work so not like a bug or anything you just need to play around a bit more. 

Use Approovly to create and track order approvals | Looking for more Shopify apps? achieveapplabs.com/#apps
0 Likes
jt274
Shopify Partner
11 1 4

@achieveapplabs 

As I mentioned, it does work for the Resource List component. But it does not work for the Index Table component, even without bulkActions. Even simply adding selectable={false} to the example does not take away the checkboxes: https://polaris.shopify.com/components/lists-and-tables/index-table

0 Likes
achieveapplabs
Shopify Partner
497 39 78

@jt274 ,

 

which version of Polaris are you using?

Use Approovly to create and track order approvals | Looking for more Shopify apps? achieveapplabs.com/#apps
0 Likes
jt274
Shopify Partner
11 1 4

@achieveapplabs Using v6.2.0

0 Likes
achieveapplabs
Shopify Partner
497 39 78

I see the opened issue here: https://github.com/Shopify/polaris-react/issues/4076

 

use an older version until it’s patched I guess. Seems to be a legit issue though. I came across a similar issue and turned out to be CSS related so maybe check developer console and see if there’s a hidden class or something that’s not working right.

Use Approovly to create and track order approvals | Looking for more Shopify apps? achieveapplabs.com/#apps
0 Likes
Chompas
Tourist
12 0 9

I'm running into the exact same problem. I don't want the checkboxes but I want to take the user to a detail page.

The main documentation for Index Table says

The main job of an index table is to help merchants get an at-a-glance of the objects to perform actions or navigate to a full-page representation of it.

On top of the bug mentioned on the previous comment, I can't figure out how to set an onClick action to navigate the user to a detail page. Any ideas?

 

0 Likes