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
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:
BrunoDeye
changed the title
[Bug]: href with search filter on resource removes navigation active state for the page using it
[Bug]: href with search filter on resource removes sidebar navigation active state for the page using it
Jun 4, 2024
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
The text was updated successfully, but these errors were encountered: