Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Do not reload page when clicking on breadcrumb #30

Open
mvergez opened this issue Aug 4, 2023 · 0 comments
Open

[Feature] Do not reload page when clicking on breadcrumb #30

mvergez opened this issue Aug 4, 2023 · 0 comments

Comments

@mvergez
Copy link
Contributor

mvergez commented Aug 4, 2023

Clicking on a breadcrumb element leads to a page reload which is not wanted.

This piece of code should help preventing this reload :

import { Link as ReactLink} from 'react-router-dom'
// add component and replace href with to
<Link
  component={ReactLink}
  underline={props.isActive ? "none" : "hover"}
  color={props.isActive ? "#00000" : "#2fa37c"}
  to={props.isActive ? "" : props.link}
  variant="body2"
>

Careful: Need to check if all the api calls are done like if the page is reloaded and if the breadcrumb is robust with this "new" link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant