fix(channels): 전체 선택 시 체크 시각화 깨지던 문제(lucide가 i를 svg로 치환)
querySelector('i')가 lucide 치환 후 null→TypeError로 시각 토글이 첫 카드에서 멈춰
전체 선택이 안 되는 것처럼 보였음. querySelector('svg, i') + null 가드로 수정.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
fd18a8981a
commit
f3c6d20442
@ -213,20 +213,21 @@
|
||||
checkboxes.forEach(cb => {
|
||||
const card = cb.closest('.card');
|
||||
const customCb = card.querySelector('.custom-checkbox');
|
||||
const checkIcon = customCb.querySelector('i');
|
||||
// lucide 가 <i data-lucide> 를 <svg> 로 치환하므로 둘 다 잡는다(없으면 무시).
|
||||
const checkIcon = customCb.querySelector('svg, i');
|
||||
|
||||
if (cb.checked) {
|
||||
card.style.borderColor = 'var(--primary)';
|
||||
card.style.background = 'rgba(59, 130, 246, 0.05)';
|
||||
customCb.style.background = 'var(--primary)';
|
||||
customCb.style.borderColor = 'var(--primary)';
|
||||
checkIcon.style.display = 'block';
|
||||
if (checkIcon) checkIcon.style.display = 'block';
|
||||
} else {
|
||||
card.style.borderColor = 'var(--glass-border)';
|
||||
card.style.background = 'var(--glass-bg)';
|
||||
customCb.style.background = 'var(--surface-2)';
|
||||
customCb.style.borderColor = 'var(--border-strong)';
|
||||
checkIcon.style.display = 'none';
|
||||
if (checkIcon) checkIcon.style.display = 'none';
|
||||
}
|
||||
});
|
||||
if (window.lucide) window.lucide.createIcons();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user