[Bug]: href with search filter on resource removes sidebar navigation active state for the page using it
BrunoDeye opened this issue · comments
Contact Details
discord @bruno_15980
What happened?
When using href with a search query on the resource, the function isSelected from the useNavigationResources in the source code doenst works correctly. Leading to a misfunction of the Sidebar navigation, that doesnt mark as active the nav button when the resource page is opened. My solution was to create a custom 'SidebarResourceSection' modifying the isSelected function to this:
the source code:
the resource with the href modified:
the behavior before the modification:
the behavior after the modification:
Bug prevalence
Always
AdminJS dependencies version
indiferent
What browsers do you see the problem on?
No response
Relevant log output
No response
Relevant code that's giving you issues
adminjs/src/frontend/hooks/use-navigation-resources.ts
Lines 14 to 17 in e27e885