The Button in the resources list cannot be clicked.
The following items passed to ResourceList:
{
attributeOne: 'Product Name',
attributeTwo: 'Variant Name',
attributeThree: <ButtonGroup segmented>
<Button plain>Edit</Button>
<Button icon="delete" onClick={this.handleDelete}></Button>
</ButtonGroup>
}
The button could be clicked and call the onClick functions.
When mouseover the button, it even won't change to pointer.
鈿擄笍 We鈥檙e not accepting pull requests at this time
馃棐 This repo is for reporting issues and feature requests only
Same with links, no pointer and no click event.
@ry5n Is there an ETA on the new ResourceList component? We're trying to plan for our launch and this will determine whether we need to roll our own.
I see Polaris version: 1.1.1, did you mean Polaris version: 1.10.1?
For your use case you can try the actions prop, as long as those actions are available on the page the item links to: <ResourceList.Item actions={[{content: 'Action', url: 'path/for/route'}] />
The upcoming version of this component is designed to support more flexible clickable children, although you may need to preventDefault in your handler.
The upcoming version will be part of a Polaris 2.0, but it鈥檚 available now as part of an early beta. Two caveats: documentation hasn鈥檛 been updated yet (working on it), and of course this is a beta so the API could change before a final release.
The 2.0, the resource list component now accepts arbitrary content, including actions, although you may need to preventDefault. Check out the new documentation: https://polaris.shopify.com/components/lists/resource-list
Most helpful comment
For your use case you can try the
actionsprop, as long as those actions are available on the page the item links to:<ResourceList.Item actions={[{content: 'Action', url: 'path/for/route'}] />The upcoming version of this component is designed to support more flexible clickable children, although you may need to preventDefault in your handler.
The upcoming version will be part of a Polaris 2.0, but it鈥檚 available now as part of an early beta. Two caveats: documentation hasn鈥檛 been updated yet (working on it), and of course this is a beta so the API could change before a final release.