Link in custom react component

Hi. I am creating a custom table with react where one of the columns will have a link. I used the Link from dash core component in React and it works to update the url once compiled to a dash application.
However my dash callback does not get triggered while listening to the pathname property of the Location component. So clicking on the url just updates the url bar but takes no action. Is there something I am missing?

Alternatively I could return a value for what cell I clicked on the table and then trigger a callback inside dash. But I felt this solution is inelegant. Suggestions?

How did you implement the link and which version of dash-core-components are you using for the dcc.Location? There was recently a change in the name of the custom event that dcc.Location is listening for which could explain the behaviour you’re seeing.

Thanks for pointing this out. I was pulling the Link component from the dev branch. And was testing it with a v.1.8.0 installation of dash. Once I changed the name of the custom event back to what it was in the release branch (“onpushstate”), the issue went away.

1 Like