fix: filesize lib was buggy. removed selection options as we dont use thos
This commit is contained in:
parent
ffef784f50
commit
4cadd0072d
|
@ -37,5 +37,5 @@ export default function filesize(bytes: number, fixed = 1, spec: keyof typeof SP
|
|||
_bytes /= radix;
|
||||
++loop;
|
||||
}
|
||||
return `${bytes.toFixed(fixed)} ${unit[loop]}`;
|
||||
return `${_bytes.toFixed(fixed)} ${unit[loop]}`;
|
||||
}
|
||||
|
|
|
@ -27,29 +27,29 @@ export type File = {
|
|||
};
|
||||
|
||||
export const columns: ColumnDef<FileItem>[] = [
|
||||
{
|
||||
id: "select",
|
||||
size: 20,
|
||||
header: ({ table }) => (
|
||||
<Checkbox
|
||||
checked={
|
||||
table.getIsAllPageRowsSelected() ||
|
||||
(table.getIsSomePageRowsSelected() && "indeterminate")
|
||||
}
|
||||
onCheckedChange={(value) => table.toggleAllPageRowsSelected(!!value)}
|
||||
aria-label="Select all"
|
||||
/>
|
||||
),
|
||||
cell: ({ row }) => (
|
||||
<Checkbox
|
||||
checked={row.getIsSelected()}
|
||||
onCheckedChange={(value) => row.toggleSelected(!!value)}
|
||||
aria-label="Select row"
|
||||
/>
|
||||
),
|
||||
enableSorting: false,
|
||||
enableHiding: false,
|
||||
},
|
||||
// {
|
||||
// id: "select",
|
||||
// size: 20,
|
||||
// header: ({ table }) => (
|
||||
// <Checkbox
|
||||
// checked={
|
||||
// table.getIsAllPageRowsSelected() ||
|
||||
// (table.getIsSomePageRowsSelected() && "indeterminate")
|
||||
// }
|
||||
// onCheckedChange={(value) => table.toggleAllPageRowsSelected(!!value)}
|
||||
// aria-label="Select all"
|
||||
// />
|
||||
// ),
|
||||
// cell: ({ row }) => (
|
||||
// <Checkbox
|
||||
// checked={row.getIsSelected()}
|
||||
// onCheckedChange={(value) => row.toggleSelected(!!value)}
|
||||
// aria-label="Select row"
|
||||
// />
|
||||
// ),
|
||||
// enableSorting: false,
|
||||
// enableHiding: false,
|
||||
// },
|
||||
{
|
||||
accessorKey: "cid",
|
||||
header: "CID",
|
||||
|
|
|
@ -64,10 +64,11 @@ export default function FileManager() {
|
|||
placeholder="Search files by name or CID"
|
||||
className="border-ring font-medium w-full grow h-12 flex-1 bg-primary-2/10"
|
||||
/>
|
||||
<Button className="h-12 gap-x-2">
|
||||
{/* We dont yet have any functionality for selecting so im commenting this out */}
|
||||
{/* <Button className="h-12 gap-x-2">
|
||||
<AddIcon />
|
||||
Select All
|
||||
</Button>
|
||||
</Button> */}
|
||||
<DialogTrigger asChild>
|
||||
<Button className="h-12 gap-x-2">
|
||||
<AddIcon />
|
||||
|
|
Loading…
Reference in New Issue