mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
chore(deps): upgrade react-table to v8 [EE-4837] (#8245)
This commit is contained in:
parent
f20d3e72b9
commit
757461d58b
140 changed files with 1805 additions and 2872 deletions
|
@ -1,19 +1,18 @@
|
|||
import { useEffect, useState } from 'react';
|
||||
import { AlertTriangle, Database } from 'lucide-react';
|
||||
import { useStore } from 'zustand';
|
||||
import { Database, AlertTriangle } from 'lucide-react';
|
||||
|
||||
import { confirm } from '@@/modals/confirm';
|
||||
import { ModalType } from '@@/modals';
|
||||
import { Datatable } from '@@/datatables';
|
||||
import { Button, ButtonGroup } from '@@/buttons';
|
||||
import { Icon } from '@@/Icon';
|
||||
import { useSearchBarState } from '@@/datatables/SearchBar';
|
||||
import { createPersistedStore } from '@@/datatables/types';
|
||||
import { buildConfirmButton } from '@@/modals/utils';
|
||||
import { useTableState } from '@@/datatables/useTableState';
|
||||
|
||||
import { IngressControllerClassMap } from '../types';
|
||||
|
||||
import { useColumns } from './columns';
|
||||
import { columns } from './columns';
|
||||
|
||||
const storageKey = 'ingressClasses';
|
||||
const settingsStore = createPersistedStore(storageKey);
|
||||
|
@ -39,12 +38,11 @@ export function IngressClassDatatable({
|
|||
noIngressControllerLabel,
|
||||
view,
|
||||
}: Props) {
|
||||
const settings = useStore(settingsStore);
|
||||
const [search, setSearch] = useSearchBarState(storageKey);
|
||||
const tableState = useTableState(settingsStore, storageKey);
|
||||
|
||||
const [ingControllerFormValues, setIngControllerFormValues] = useState(
|
||||
ingressControllers || []
|
||||
);
|
||||
const columns = useColumns();
|
||||
|
||||
useEffect(() => {
|
||||
if (allowNoneIngressClass === undefined) {
|
||||
|
@ -81,6 +79,7 @@ export function IngressClassDatatable({
|
|||
return (
|
||||
<div className="-mx-[15px]">
|
||||
<Datatable
|
||||
settingsManager={tableState}
|
||||
dataset={ingControllerFormValues || []}
|
||||
columns={columns}
|
||||
isLoading={isLoading}
|
||||
|
@ -90,12 +89,6 @@ export function IngressClassDatatable({
|
|||
getRowId={(row) => `${row.Name}-${row.ClassName}-${row.Type}`}
|
||||
renderTableActions={(selectedRows) => renderTableActions(selectedRows)}
|
||||
description={renderIngressClassDescription()}
|
||||
initialPageSize={settings.pageSize}
|
||||
onPageSizeChange={settings.setPageSize}
|
||||
initialSortBy={settings.sortBy}
|
||||
onSortByChange={settings.setSortBy}
|
||||
searchValue={search}
|
||||
onSearchChange={setSearch}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue