fix:삭제 버튼 항상 표시 (선택 없으면 비활성 상태)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -161,15 +161,13 @@ className="border rounded-lg px-3 py-2 text-sm">
|
||||
<input type="text" placeholder="제목 또는 코드 검색..." value={filter.search}
|
||||
onChange={e => { setFilter(f => ({...f, search: e.target.value})); setPage(1); }}
|
||||
className="border rounded-lg px-3 py-2 text-sm flex-1 max-w-xs" />
|
||||
{selected.size > 0 && (
|
||||
<button onClick={handleDelete} disabled={deleting}
|
||||
className="ml-auto inline-flex items-center gap-1.5 px-3 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 text-sm font-medium disabled:opacity-50 transition-colors">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
||||
<polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"/>
|
||||
</svg>
|
||||
{deleting ? '삭제 중...' : `${selected.size}건 삭제`}
|
||||
</button>
|
||||
)}
|
||||
<button onClick={handleDelete} disabled={deleting || selected.size === 0}
|
||||
className={`ml-auto inline-flex items-center gap-1.5 px-3 py-2 rounded-lg text-sm font-medium transition-colors ${selected.size > 0 ? 'bg-red-600 text-white hover:bg-red-700' : 'bg-gray-100 text-gray-400 cursor-not-allowed'}`}>
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
||||
<polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"/>
|
||||
</svg>
|
||||
{deleting ? '삭제 중...' : selected.size > 0 ? `${selected.size}건 삭제` : '선택 삭제'}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* 목록 */}
|
||||
|
||||
Reference in New Issue
Block a user