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:
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
https://github.com/SoftwareBrothers/adminjs/blob/e27e885e819529b0dd9ba2e5b64e6afade1b59aa/src/frontend/hooks/use-navigation-resources.ts#L14-L17