fix(ui): перенести таблицы BGP и OSPF на ReUI v9

This commit is contained in:
Denozordec committed 2026-09-13 21:10:06 +07:00
1 parent e66762ca2e
commit d3db82fd1c
6 files changed
+132 -49

No files matched your search

+11 -11
View File
@@ -1,20 +1,20 @@
"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 { cn } from "@/lib/utils"
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 { ActivityIcon } from "lucide-react"
@@ -69,7 +69,7 @@ interface OspfBfdDataGridProps {
}
function OspfBfdDataGrid({ sessions }: OspfBfdDataGridProps) {
const columns = useMemo<ColumnDef<BfdSessionRow>[]>(
const columns = useMemo<ColumnDef<DataGridFeatures, BfdSessionRow>[]>(
() => [
{
id: "serverLabel",
@@ -267,11 +267,11 @@ function OspfBfdDataGrid({ sessions }: OspfBfdDataGridProps) {
[],
)
const table = useReactTable({
const table = useTable({
features: dataGridFeatures,
manualPagination: true,
data: sessions,
columns,
getCoreRowModel: getCoreRowModel(),
getSortedRowModel: getSortedRowModel(),
getRowId: (row) => row.id,
})