fix(ui): перенести таблицы сборщика и проб на ReUI v9

This commit is contained in:
Denozordec committed 2026-09-14 13:49:54 +07:00
1 parent f81b35308b
commit ddf1851e92
5 files changed
+114 -30

No files matched your search

@@ -1,22 +1,22 @@
"use client"
import { dataGridFeatures, type DataGridFeatures } from "@/components/reui/data-grid"
import { useMemo } from "react"
import {
type ColumnDef,
getCoreRowModel,
getSortedRowModel,
useReactTable,
} from "@tanstack/react-table-v8"
useTable,
} from "@tanstack/react-table"
import type { Server } from "@/lib/data"
import { cn } from "@/lib/utils"
import { FormToggle } from "@/components/form-kit"
import { DataGridShell } from "@/components/data-grids/shared/legacy-data-grid-shell"
import { DataGridShell } from "@/components/data-grids/shared/data-grid-shell"
import {
DATA_GRID_CELL_PAD,
DATA_GRID_CELL_PAD_FIRST,
DATA_GRID_CELL_PAD_LAST,
} from "@/components/data-grids/shared/legacy-data-grid-layout"
import { DataGridSortHeader } from "@/components/data-grids/shared/legacy-data-grid-sort-header"
} from "@/components/data-grids/shared/data-grid-layout"
import { DataGridSortHeader } from "@/components/data-grids/shared/data-grid-sort-header"
import { EmptyState } from "@/components/empty-state"
import { ClockIcon, Trash2Icon } from "lucide-react"
@@ -59,7 +59,7 @@ function ProbesScheduleDataGrid({
[serverOptions],
)
const columns = useMemo<ColumnDef<SchedRule>[]>(
const columns = useMemo<ColumnDef<DataGridFeatures, SchedRule>[]>(
() => [
{
id: "enabled",
@@ -196,11 +196,11 @@ function ProbesScheduleDataGrid({
[onDelete, onToggleEnabled, serverMap, tunnelName],
)
const table = useReactTable({
const table = useTable({
features: dataGridFeatures,
manualPagination: true,
data: rules,
columns,
getCoreRowModel: getCoreRowModel(),
getSortedRowModel: getSortedRowModel(),
getRowId: (row) => row.id,
})