feat(cmdk): Enter on 'key: value' query submits as attribute facet
This commit is contained in:
@@ -823,12 +823,18 @@ function LayoutContent() {
|
|||||||
} else {
|
} else {
|
||||||
navigate('/admin/rbac');
|
navigate('/admin/rbac');
|
||||||
}
|
}
|
||||||
} else {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const facet = parseFacetQuery(query);
|
||||||
const baseParts = ['/exchanges'];
|
const baseParts = ['/exchanges'];
|
||||||
if (scope.appId) baseParts.push(scope.appId);
|
if (scope.appId) baseParts.push(scope.appId);
|
||||||
if (scope.routeId) baseParts.push(scope.routeId);
|
if (scope.routeId) baseParts.push(scope.routeId);
|
||||||
navigate(`${baseParts.join('/')}?text=${encodeURIComponent(query)}`);
|
if (facet) {
|
||||||
|
navigate(`${baseParts.join('/')}?attr=${encodeURIComponent(formatAttrParam(facet))}`);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
navigate(`${baseParts.join('/')}?text=${encodeURIComponent(query)}`);
|
||||||
}, [isAdminPage, adminSearchData, handlePaletteSelect, navigate, scope.appId, scope.routeId]);
|
}, [isAdminPage, adminSearchData, handlePaletteSelect, navigate, scope.appId, scope.routeId]);
|
||||||
|
|
||||||
const handleSidebarNavigate = useCallback((path: string) => {
|
const handleSidebarNavigate = useCallback((path: string) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user