diff options
| author | diogo464 <[email protected]> | 2025-08-11 16:50:53 +0100 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2025-08-11 16:50:53 +0100 |
| commit | 9e85f30c31a510b9d4dc2fb67534d86f4dac6d53 (patch) | |
| tree | 95d2333b0740476b7722f7f1b4f9878a2196f5c5 /frontend | |
| parent | c2f5cd994d4d02b8b2ed7ba7b8ab8911c8ad6216 (diff) | |
Remove select all checkbox from table header
- Keep individual row checkboxes for file selection
- Remove complex select all logic from table header
- Maintain column alignment with empty header cell
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/file-drive.tsx | 46 |
1 files changed, 1 insertions, 45 deletions
diff --git a/frontend/file-drive.tsx b/frontend/file-drive.tsx index ffcc6f5..d59d7c9 100644 --- a/frontend/file-drive.tsx +++ b/frontend/file-drive.tsx | |||
| @@ -494,51 +494,7 @@ export default function FileDrive() { | |||
| 494 | <Table> | 494 | <Table> |
| 495 | <TableHeader> | 495 | <TableHeader> |
| 496 | <TableRow> | 496 | <TableRow> |
| 497 | <TableHead className="w-[40px]"> | 497 | <TableHead className="w-[40px]"></TableHead> |
| 498 | <Checkbox | ||
| 499 | checked={ | ||
| 500 | selectedFiles.size > 0 && | ||
| 501 | selectedFiles.size === | ||
| 502 | (() => { | ||
| 503 | const getAllPaths = (items: DriveTreeNode[]): string[] => { | ||
| 504 | const paths: string[] = [] | ||
| 505 | items.forEach((item) => { | ||
| 506 | paths.push(item.path) | ||
| 507 | if (item.children) { | ||
| 508 | paths.push(...getAllPaths(item.children)) | ||
| 509 | } | ||
| 510 | }) | ||
| 511 | return paths | ||
| 512 | } | ||
| 513 | return getAllPaths(files).length | ||
| 514 | })() | ||
| 515 | } | ||
| 516 | indeterminate={ | ||
| 517 | selectedFiles.size > 0 && | ||
| 518 | selectedFiles.size < | ||
| 519 | (() => { | ||
| 520 | const getAllPaths = (items: DriveTreeNode[]): string[] => { | ||
| 521 | const paths: string[] = [] | ||
| 522 | items.forEach((item) => { | ||
| 523 | paths.push(item.path) | ||
| 524 | if (item.children) { | ||
| 525 | paths.push(...getAllPaths(item.children)) | ||
| 526 | } | ||
| 527 | }) | ||
| 528 | return paths | ||
| 529 | } | ||
| 530 | return getAllPaths(files).length | ||
| 531 | })() | ||
| 532 | } | ||
| 533 | onCheckedChange={(checked) => { | ||
| 534 | if (checked) { | ||
| 535 | selectAll() | ||
| 536 | } else { | ||
| 537 | deselectAll() | ||
| 538 | } | ||
| 539 | }} | ||
| 540 | /> | ||
| 541 | </TableHead> | ||
| 542 | <TableHead>Name</TableHead> | 498 | <TableHead>Name</TableHead> |
| 543 | <TableHead>Size</TableHead> | 499 | <TableHead>Size</TableHead> |
| 544 | <TableHead>Modified</TableHead> | 500 | <TableHead>Modified</TableHead> |
