polaris icon indicating copy to clipboard operation
polaris copied to clipboard

Using `data-primary-link` only works once when not redirecting to a different page

Open brydonm opened this issue 4 years ago • 7 comments
trafficstars

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

  1. Use data-primary-link setup in IndexTable
  2. Click the link to add a URL param or use an onClick handler to stay on the same page
  3. Link no longer works

Reduced test case

https://codesandbox.io/s/unselectable-index-table-forked-utd6z

brydonm avatar Jul 28 '21 16:07 brydonm

👋 Thanks for opening your first issue. A contributor should give feedback soon. If you haven’t already, please check out the contributing guidelines.

ghost avatar Jul 28 '21 16:07 ghost

@chloerice if you would be so kind to have a look at this when you have some time! 🥳

brydonm avatar Jul 28 '21 16:07 brydonm

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.

alex-page avatar Aug 04 '21 21:08 alex-page

I'll get on that @alex-page. Thanks!

brydonm avatar Aug 05 '21 15:08 brydonm

Legend. Thank you @Brydom ✨. Feel free to add me as a reviewer.

alex-page avatar Aug 05 '21 15:08 alex-page

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

brydonm avatar Aug 05 '21 16:08 brydonm

Is there any workaround for this yet?

TheSecurityDev avatar May 20 '22 13:05 TheSecurityDev

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.

github-actions[bot] avatar Apr 16 '23 03:04 github-actions[bot]

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.

github-actions[bot] avatar Nov 09 '23 03:11 github-actions[bot]

Still an issue.

chloerice avatar Mar 04 '24 18:03 chloerice