Search: Fixes searching by current folder when opened by clicking dashboard folder name (#57716)

* Search: Read from url on mount no on app boot

* Fixed tests

* Remove unused type
This commit is contained in:
Torkel Ödegaard
2022-11-01 10:11:42 +01:00
committed by GitHub
parent 1f7c84f125
commit 3991be4c1d
4 changed files with 29 additions and 23 deletions

View File

@@ -349,7 +349,7 @@ export const DashNav = React.memo<Props>((props) => {
// this ensures the component rerenders when the location changes
const location = useLocation();
const titleHref = locationUtil.getUrlForPartial(location, { search: 'open' });
const parentHref = locationUtil.getUrlForPartial(location, { search: 'open', folder: 'current' });
const parentHref = locationUtil.getUrlForPartial(location, { search: 'open', query: 'folder:current' });
const onGoBack = isFullscreen ? onClose : undefined;
if (config.featureToggles.topnav) {