coreui-react icon indicating copy to clipboard operation
coreui-react copied to clipboard

Nav Links Not Working

Open jpwalters opened this issue 1 year ago • 2 comments

  • Operating system: Windows 11
  • Browser: Chrome
  • Branch: v5

BUG: The navigation links aren't working. You can open a node but when you attempt to click a link like Accordion, Cards, List Group, etc. nothing happens. If I modify the url manually the page for example http://localhost:3000/#/base/accordion the page loads normally.

image

jpwalters avatar Feb 28 '24 22:02 jpwalters

Work Around: In the _nav.js file if you change the property to: to be href: all the navigation links will work as expected again. Plus you have to add # in front of each url.

jpwalters avatar Feb 29 '24 00:02 jpwalters

Thanks @jpwalters for this report and suggested workaround. Can confirm that your fix works https://github.com/victronenergy/venus-influx-loader/commit/2c55b4741b4f634984cf67b7b4da27e33489842e.

However not sure what has changed and why to: no longer works.

CNavLink param to is marked as @ignore since 4.0.

https://github.com/coreui/coreui-react/blob/e9e34e1d98510608c29540ceefe582a860e27ef3/packages/coreui-react/src/components/nav/CNavLink.tsx#L11-L20

which is why it does not show at all in the official docs for CNavLink.

https://coreui.io/react/docs/components/navs-tabs/#cnavlink

Anyway, where does the trick with prepending the href with # comes from?

mman avatar Apr 22 '24 09:04 mman