Skip to content

Commit 5d0c5a3

Browse files
committed
feat: improve keywords query param in orgs page
1 parent 3bb79a2 commit 5d0c5a3

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

app/pages/@[org].vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,15 @@ const updateUrl = debounce((updates: { filter?: string; sort?: string }) => {
9191
}, 300)
9292
9393
// Update URL when filter/sort changes (debounced)
94-
watch([() => filters.value.text, sortOption], ([filter, sort]) => {
95-
updateUrl({ filter, sort })
96-
})
94+
watch(
95+
[() => filters.value.text, () => filters.value.keywords, () => sortOption.value] as const,
96+
([text, keywords, sort]) => {
97+
const filter = [text, ...keywords.map(keyword => `keyword:${keyword}`)]
98+
.filter(Boolean)
99+
.join(' ')
100+
updateUrl({ filter, sort })
101+
},
102+
)
97103
98104
const filteredCount = computed(() => sortedPackages.value.length)
99105

0 commit comments

Comments
 (0)