fix: show type icon and label for "Note" type in search and autocomplete
The "Note" type was explicitly filtered out with `isA !== 'Note'` in SearchPanel, NoteAutocomplete, and useNoteSearch, preventing its icon and label from appearing. Remove this special-casing so all types display consistently. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -37,7 +37,7 @@ function matchEntries(entries: VaultEntry[], typeEntryMap: Record<string, VaultE
|
||||
return matches.slice(0, MAX_RESULTS).map(e => {
|
||||
const isA = e.isA
|
||||
const te = typeEntryMap[isA ?? '']
|
||||
const noteType = isA && isA !== 'Note' ? isA : undefined
|
||||
const noteType = isA || undefined
|
||||
return {
|
||||
title: e.title,
|
||||
noteType,
|
||||
|
||||
@@ -193,7 +193,7 @@ function SearchContent({
|
||||
{results.map((result, i) => {
|
||||
const entry = entryLookup.get(result.path)
|
||||
const isA = entry?.isA ?? result.noteType
|
||||
const noteType = isA && isA !== 'Note' ? isA : null
|
||||
const noteType = isA || null
|
||||
const te = typeEntryMap[isA ?? '']
|
||||
const typeColor = noteType ? getTypeColor(isA, te?.color) : undefined
|
||||
const TypeIcon = getTypeIcon(isA ?? null, te?.icon)
|
||||
|
||||
Reference in New Issue
Block a user