show applied tags first in tag selector picker
Applied tags are now pinned to the front of each category's tag list, with unapplied tags continuing in usage order behind them. Both partitions preserve the existing usage-sort from the API. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -298,9 +298,13 @@ export default function TagSelector({ itemKey, onTagsChanged, refreshKey }: Prop
|
||||
{all.categories.map((category) => {
|
||||
const categoryTags = all.tags.filter((t) => t.categoryId === category.id)
|
||||
const search = categorySearches[category.id] ?? ''
|
||||
const visibleTags = categoryTags
|
||||
.filter((t) => !search || t.name.toLowerCase().includes(search.toLowerCase()))
|
||||
.slice(0, 25)
|
||||
const filtered = categoryTags.filter(
|
||||
(t) => !search || t.name.toLowerCase().includes(search.toLowerCase())
|
||||
)
|
||||
const visibleTags = [
|
||||
...filtered.filter((t) => isAssigned(t.id)),
|
||||
...filtered.filter((t) => !isAssigned(t.id)),
|
||||
].slice(0, 25)
|
||||
|
||||
return (
|
||||
<div key={category.id}>
|
||||
|
||||
Reference in New Issue
Block a user