Topic: Can a refreshed settings page reopen the panel in its URL fragment?
copperPixel
free
asked 1 week ago
We send links such as /account/settings#notifications to colleagues, but a fresh page load always shows the first pills panel. Clicking Notifications afterward works correctly.
The panel IDs are unique and the navigation is present in the initial HTML. We would like valid fragments to select the matching panel while an unknown fragment falls back to the default. When should that selection happen?
Igor Przybysz
staff
answered 6 days ago
Treat the fragment as an application request to select a panel. Resolve it against the IDs your settings screen actually supports, then activate the matching navigation trigger after the Tab component has initialized. A browser fragment by itself does not establish the component's active state.
Keep the normal first-panel state when the fragment is absent or unknown, and use the documented tab selection behavior rather than changing only one active class. That keeps the trigger, panel visibility and accessibility attributes in sync. If initialization is asynchronous, place the selection in its completion path.
https://mdbootstrap.com/docs/standard/navigation/pills/
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB Standard
- MDB Version: MDB5 9.3.0
- Device: Desktop
- Browser: Firefox
- OS: Windows 11
- Provided sample code: No
- Provided link: No