fiduswriter / simple-datatables

DataTables but in TypeScript transpiled to Vanilla JS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding <Link> component inside tablecell causes page refresh when clicked.

ActionCoding opened this issue · comments

Hi All,

I have a datatable setup with a link to view a detail page using the component. I use this on all other parts of my SPA and it routes the user to the correct path without page refresh but when I use it inside a dataTable it causes page refresh. Any idea why this is happening only inside the dataTable?

Basically, datatable is converting jsx into a string so adding a Link component from react-router-dom is changed into a standard <a tag which react reloads the page when clicked as opposed to looking for a page component.

ok, but that is not a demo. Please provide one and reopen this issue.