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:
@@ -234,10 +234,8 @@ export class CardSection {
|
|||||||
const addCard = content.querySelector('.cs-add-card');
|
const addCard = content.querySelector('.cs-add-card');
|
||||||
|
|
||||||
cards.forEach(card => {
|
cards.forEach(card => {
|
||||||
const nameEl = card.querySelector('.card-title') || card.querySelector('.template-name');
|
const text = card.textContent.toLowerCase();
|
||||||
if (!nameEl) { card.style.display = ''; return; }
|
card.style.display = (!lower || text.includes(lower)) ? '' : 'none';
|
||||||
const name = nameEl.textContent.toLowerCase();
|
|
||||||
card.style.display = (!lower || name.includes(lower)) ? '' : 'none';
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (addCard) addCard.style.display = lower ? 'none' : '';
|
if (addCard) addCard.style.display = lower ? 'none' : '';
|
||||||
|
|||||||
Reference in New Issue
Block a user