mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 18:56:17 +01:00
pre release refactoring + update changelog
This commit is contained in:
@@ -252,7 +252,7 @@ export const columns: ColumnDef<DiskInfo>[] = [
|
||||
]
|
||||
|
||||
export default function DisksTable({ systemId }: { systemId: string }) {
|
||||
const [sorting, setSorting] = React.useState<SortingState>([{ id: "device", desc: false }])
|
||||
// const [sorting, setSorting] = React.useState<SortingState>([{ id: "device", desc: false }])
|
||||
const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>([])
|
||||
const [rowSelection, setRowSelection] = React.useState({})
|
||||
const [smartData, setSmartData] = React.useState<Record<string, SmartData> | undefined>(undefined)
|
||||
@@ -284,19 +284,23 @@ export default function DisksTable({ systemId }: { systemId: string }) {
|
||||
const table = useReactTable({
|
||||
data: diskData,
|
||||
columns: columns,
|
||||
onSortingChange: setSorting,
|
||||
// onSortingChange: setSorting,
|
||||
onColumnFiltersChange: setColumnFilters,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
getSortedRowModel: getSortedRowModel(),
|
||||
getFilteredRowModel: getFilteredRowModel(),
|
||||
onRowSelectionChange: setRowSelection,
|
||||
state: {
|
||||
sorting,
|
||||
// sorting,
|
||||
columnFilters,
|
||||
rowSelection,
|
||||
},
|
||||
})
|
||||
|
||||
if (!diskData.length && !columnFilters.length) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Card className="p-6 @container w-full">
|
||||
|
||||
Reference in New Issue
Block a user