-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
tedi-readyTEDI-Ready component issueTEDI-Ready component issue
Description
Problem
Sidenav has prop navItems, in mobile view when said prop updates, it does not trigger change in actual Sidenav content.
Sidenav.mobile caches navItems and does not update contents on prop.navItems change.
Real life problem: user logs in and has to choose a role - sidenav is related to users active role. Alternative, user navigates between pages, navItem isActive value updates but sidenav content does not update.
Solution
Fix Sidenav mobile view to switch out contents of sidenav when new props are presented.
Examples and information
Workaround (not optimal): Add React key prop to root level sidenav and change the key every time props change. Causes sidenav content to update at the cost of recreating the whole component.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
tedi-readyTEDI-Ready component issueTEDI-Ready component issue
Type
Projects
Status
Done