feat(cmdk): Enter on 'key: value' query submits as attribute facet

This commit is contained in:
hsiegeln
2026-04-24 11:21:12 +02:00
parent 7529a9ce99
commit cbaac2bfa5

View File

@@ -823,12 +823,18 @@ function LayoutContent() {
} else {
navigate('/admin/rbac');
}
} else {
return;
}
const facet = parseFacetQuery(query);
const baseParts = ['/exchanges'];
if (scope.appId) baseParts.push(scope.appId);
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]);
const handleSidebarNavigate = useCallback((path: string) => {