mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
refactor(groups): migrate groups selectors to react [EE-3842] (#8936)
This commit is contained in:
parent
2018529add
commit
e91b4f5c83
38 changed files with 543 additions and 627 deletions
|
@ -17,6 +17,8 @@ import { ReactNode, useMemo } from 'react';
|
|||
import clsx from 'clsx';
|
||||
import _ from 'lodash';
|
||||
|
||||
import { AutomationTestingProps } from '@/types';
|
||||
|
||||
import { IconProps } from '@@/Icon';
|
||||
|
||||
import { DatatableHeader } from './DatatableHeader';
|
||||
|
@ -32,7 +34,7 @@ import { TableRow } from './TableRow';
|
|||
export interface Props<
|
||||
D extends Record<string, unknown>,
|
||||
TSettings extends BasicTableSettings = BasicTableSettings
|
||||
> {
|
||||
> extends AutomationTestingProps {
|
||||
dataset: D[];
|
||||
columns: TableOptions<D>['columns'];
|
||||
renderTableSettings?(instance: TableInstance<D>): ReactNode;
|
||||
|
@ -82,6 +84,7 @@ export function Datatable<D extends Record<string, unknown>>({
|
|||
highlightedItemId,
|
||||
noWidget,
|
||||
getRowCanExpand,
|
||||
'data-cy': dataCy,
|
||||
}: Props<D>) {
|
||||
const isServerSidePagination = typeof pageCount !== 'undefined';
|
||||
const enableRowSelection = getIsSelectionEnabled(
|
||||
|
@ -156,6 +159,7 @@ export function Datatable<D extends Record<string, unknown>>({
|
|||
emptyContentLabel={emptyContentLabel}
|
||||
isLoading={isLoading}
|
||||
onSortChange={handleSortChange}
|
||||
data-cy={dataCy}
|
||||
/>
|
||||
|
||||
<DatatableFooter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue