Fix cmd+p filtering reference

https://feedback.yaak.app/p/search-doesnt-actually-search-through-all-the-apis
This commit is contained in:
Gregory Schier
2025-04-22 07:46:10 -07:00
parent 2eb3c2241c
commit b8c42677ca

View File

@@ -350,10 +350,10 @@ export function CommandPaletteDialog({ onClose }: { onClose: () => void }) {
const filteredGroups = groups
.map((g) => {
g.items = result
const items = result
.filter((i) => g.items.find((i2) => i2.key === i.key))
.slice(0, MAX_PER_GROUP);
return g;
return { ...g, items };
})
.filter((g) => g.items.length > 0);