Skip to content

Commit e6015ad

Browse files
committed
Take URL pathname in nav, not the computed one
1 parent 5e42ef7 commit e6015ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-renderer-demo/src/components/navigation/menu-renderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ const Menu = ({ schema, searchRef }) => {
134134
const router = useRouter();
135135
const [value, setValue] = useState('');
136136
const classes = useStyles();
137-
const currentLocation = router.pathname.split('/');
137+
const currentLocation = router.asPath.replace(/\?.*/, '').split('/');
138138

139139
const schemaFiltered = value !== '' ? search(schema, value) : current(schema, currentLocation);
140140

0 commit comments

Comments
 (0)