mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
refactor(docker/services): convert service tasks table to react [EE-4674] (#10188)
This commit is contained in:
parent
c47a804c97
commit
c3d266931f
26 changed files with 421 additions and 322 deletions
|
@ -23,6 +23,11 @@ interface Props<D extends DefaultType> {
|
|||
initialTableState?: Partial<TableState>;
|
||||
isLoading?: boolean;
|
||||
initialSortBy?: BasicTableSettings['sortBy'];
|
||||
|
||||
/**
|
||||
* keyword to filter by
|
||||
*/
|
||||
search?: string;
|
||||
}
|
||||
|
||||
export function NestedDatatable<D extends DefaultType>({
|
||||
|
@ -33,6 +38,7 @@ export function NestedDatatable<D extends DefaultType>({
|
|||
initialTableState = {},
|
||||
isLoading,
|
||||
initialSortBy,
|
||||
search,
|
||||
}: Props<D>) {
|
||||
const tableInstance = useReactTable<D>({
|
||||
columns,
|
||||
|
@ -45,6 +51,9 @@ export function NestedDatatable<D extends DefaultType>({
|
|||
enableColumnFilter: false,
|
||||
enableHiding: false,
|
||||
},
|
||||
state: {
|
||||
globalFilter: search,
|
||||
},
|
||||
getRowId,
|
||||
autoResetExpanded: false,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
|
@ -55,7 +64,7 @@ export function NestedDatatable<D extends DefaultType>({
|
|||
|
||||
return (
|
||||
<NestedTable>
|
||||
<Table.Container>
|
||||
<Table.Container noWidget>
|
||||
<DatatableContent<D>
|
||||
tableInstance={tableInstance}
|
||||
isLoading={isLoading}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue