You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Been poking around through the docs on both Mantine 7 and react-router-dom, and unfortunately haven't seen any clear path to connecting the NavLink.active prop to react-router-dom such that it is active after the to prop has been navigated to.
It's not about adding attributes in the case of Remix/React Router, as the aria-current attribute is already added by the framework/library. The issue is that Mantine only applies active styles for the data-active attribute. If Mantine expanded the active style to also include aria-current, I thought that might allow the active style to be applied when frameworks like Remix used aria-current="page" to indicate the link is for the active page.
I changed that one line in the generated styles and it appears to apply the active style when a Remix NavLink is used inside renderRoot without having to add anything to either the Mantine or Remix NavLink components.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Been poking around through the docs on both Mantine 7 and react-router-dom, and unfortunately haven't seen any clear path to connecting the
NavLink.active
prop to react-router-dom such that it is active after theto
prop has been navigated to.Any insights?
Beta Was this translation helpful? Give feedback.
All reactions