fix(ui): завершить основу таблиц и фильтров серверов
This commit is contained in:
1 parent
f9a4a07996
commit
3d3c45e4d2
24 files changed
+385
-263
No files matched your search
@@ -28,7 +28,7 @@ import type {
|
||||
DataGridTableInstance,
|
||||
} from "@/components/reui/data-grid/data-grid"
|
||||
import { flexRender, Subscribe } from "@tanstack/react-table"
|
||||
import type { Cell, Column, Header, Row, Table } from "@tanstack/react-table"
|
||||
import type { Cell, Column, Header, Row, } from "@tanstack/react-table"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
import { Button } from "@/components/ui/button"
|
||||
@@ -741,19 +741,19 @@ function DataGridTableBase({ children }: { children: ReactNode }) {
|
||||
props.tableLayout?.columnsResizable,
|
||||
// Visibility/order/pinning change the flat header set, so a column shown
|
||||
// after mount must get its size variable even though sizing is untouched.
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
||||
table.state.columnSizing,
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
||||
table.state.columnVisibility,
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
||||
table.state.columnOrder,
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
||||
table.state.columnPinning,
|
||||
// A def swap can change a column's `size` without touching sizing
|
||||
// STATE; without this dep the CSS variables keep the old widths. For a
|
||||
// consumer defining columns inline the memo degrades to per-render
|
||||
// recompute, which is the safe direction.
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
|
||||
table.options.columns,
|
||||
])
|
||||
|
||||
@@ -956,7 +956,7 @@ function DataGridTableHead({ children }: { children: ReactNode }) {
|
||||
|
||||
function DataGridTableHeadRow({
|
||||
children,
|
||||
rowId,
|
||||
rowId: _rowId,
|
||||
}: {
|
||||
children: ReactNode
|
||||
rowId: string
|
||||
@@ -1460,7 +1460,7 @@ function DataGridTableFootRowCell({
|
||||
}
|
||||
|
||||
function DataGridTableBodyRowSkeleton({ children }: { children: ReactNode }) {
|
||||
const { table, props } = useDataGrid()
|
||||
const { props } = useDataGrid()
|
||||
|
||||
return (
|
||||
<tr
|
||||
@@ -2340,7 +2340,7 @@ const MemoizedDataGridTableBodyRows = memo(
|
||||
) as typeof DataGridTableBodyRows
|
||||
|
||||
function DataGridTableHeader<TData extends object>() {
|
||||
const { table, props } = useDataGrid()
|
||||
const { table, props } = useDataGrid<TData>()
|
||||
const mergedHeaderGroups = getDataGridTableMergedHeaderGroups(table)
|
||||
const hasRightPinnedColumns = hasDataGridTableRightPinnedColumns(table)
|
||||
|
||||
@@ -2415,7 +2415,7 @@ function DataGridTable<TData extends object>({
|
||||
footerContent?: ReactNode
|
||||
renderHeader?: boolean
|
||||
}) {
|
||||
const { table, props } = useDataGrid()
|
||||
const { table, props } = useDataGrid<TData>()
|
||||
const mergedHeaderGroups = getDataGridTableMergedHeaderGroups(table)
|
||||
const hasRightPinnedColumns = hasDataGridTableRightPinnedColumns(table)
|
||||
|
||||
|
||||
Reference in new issue
Block a user