fix(sidebar): include component tag names in sidebar search filtering

This commit is contained in:
2026-04-12 17:17:04 +00:00
parent 02e1f536d5
commit 977d8ab5e0
3 changed files with 11 additions and 1 deletions

View File

@@ -654,6 +654,8 @@ export class WccSidebar extends DeesElement {
const entries = getSectionItems(section);
const filteredEntries = entries.filter(([name, item]) => {
if (this.matchesSearch(name)) return true;
const tagName = (item as any).is;
if (tagName && this.matchesSearch(tagName)) return true;
const rawGroups = (item as any).demoGroups;
if (!rawGroups) return false;
const groups: string[] = Array.isArray(rawGroups) ? rawGroups : [rawGroups];
@@ -692,6 +694,8 @@ export class WccSidebar extends DeesElement {
// Filter entries by search query
const filteredEntries = entries.filter(([name, item]) => {
if (this.matchesSearch(name)) return true;
const tagName = (item as any).is;
if (tagName && this.matchesSearch(tagName)) return true;
const rawGroups = (item as any).demoGroups;
if (!rawGroups) return false;
const groups: string[] = Array.isArray(rawGroups) ? rawGroups : [rawGroups];