added comments

Signed-off-by: Alex Rybchenko <arybchenko@box.com>
This commit is contained in:
Alex Rybchenko
2021-10-29 16:15:07 +02:00
parent ab451ef227
commit 7c5f6a0400
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -3,4 +3,4 @@
'@backstage/plugin-catalog': patch
---
fixed route resolving
fixed route resolving (ssue #7741) when user cannot select a tab in any of the tabbed pages (like the Catalog page) if it shares the same initial letters as a preceding tab. (i.e. where tab with a path of /ci is followed by a path of /cid, user cannot select /cid as /ci will always be selected first).
@@ -35,6 +35,7 @@ export function useSelectedSubRoute(subRoutes: SubRoute[]): {
// TODO: remove once react-router updated
const sortedRoutes = routes.sort((a, b) =>
// remove added "/*" symbols from path before comparing
b.path.slice(0, -2).localeCompare(a.path.slice(0, -2)),
);