polaris
polaris copied to clipboard
Using `data-primary-link` only works once when not redirecting to a different page
Issue summary
The index table data-primary-link prop does not trigger a click/redirect after the first time. We think this is because of the isNavigating.current assignment on l101 of Row.tsx.
I'm not entirely sure of what the purpose is with isNavigating, but, it looks like it could almost be removed? Alternatively, it may just be able to be moved down below l110 after the if/else.
Expected behavior
It should keep triggering after the first click.
Actual behavior
It does not work after the first click.
Steps to reproduce the problem
- Use
data-primary-linksetup inIndexTable - Click the link to add a URL param or use an
onClickhandler to stay on the same page - Link no longer works
Reduced test case
https://codesandbox.io/s/unselectable-index-table-forked-utd6z
👋 Thanks for opening your first issue. A contributor should give feedback soon. If you haven’t already, please check out the contributing guidelines.
@chloerice if you would be so kind to have a look at this when you have some time! 🥳
Hey @Brydom thanks for bringing this up. Do you have time to create a pull request? Our team is busy with a lot of new work and is supporting this project with pull request reviews.
I'll get on that @alex-page. Thanks!
Legend. Thank you @Brydom ✨. Feel free to add me as a reviewer.
Hey @alex-page I have two PRs ready if you have a moment to check both out—would appreciate it! I don't have permissions to set reviewers.
- https://github.com/Shopify/polaris-react/pull/4361
- https://github.com/Shopify/polaris-react/pull/4359
Is there any workaround for this yet?
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's design system and dev experience.
Hi! We noticed there hasn’t been activity on this issue in a while. After 30 days, it will close automatically.
If it’s still relevant, or you have updates, comment and let us know. And don’t worry, you can always re-open later if needed.
Still an issue.