Search all card text content in section filter, not just title

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-25 01:46:13 +03:00
parent e0e744095e
commit d4a7c81296

View File

@@ -234,10 +234,8 @@ export class CardSection {
const addCard = content.querySelector('.cs-add-card');
cards.forEach(card => {
const nameEl = card.querySelector('.card-title') || card.querySelector('.template-name');
if (!nameEl) { card.style.display = ''; return; }
const name = nameEl.textContent.toLowerCase();
card.style.display = (!lower || name.includes(lower)) ? '' : 'none';
const text = card.textContent.toLowerCase();
card.style.display = (!lower || text.includes(lower)) ? '' : 'none';
});
if (addCard) addCard.style.display = lower ? 'none' : '';