mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 06:49:40 +02:00
refactor(kube/apps): migrate stacks table to react [EE-4661] (#10091)
This commit is contained in:
parent
a5f60c64ef
commit
25d5e62f5c
31 changed files with 516 additions and 565 deletions
|
@ -6,14 +6,12 @@ import { DefaultType } from './types';
|
|||
|
||||
interface Props<D extends DefaultType> {
|
||||
row: Row<D>;
|
||||
disableSelect?: boolean;
|
||||
renderSubRow(row: Row<D>): ReactNode;
|
||||
expandOnClick?: boolean;
|
||||
}
|
||||
|
||||
export function ExpandableDatatableTableRow<D extends DefaultType>({
|
||||
row,
|
||||
disableSelect,
|
||||
renderSubRow,
|
||||
expandOnClick,
|
||||
}: Props<D>) {
|
||||
|
@ -25,14 +23,7 @@ export function ExpandableDatatableTableRow<D extends DefaultType>({
|
|||
cells={cells}
|
||||
onClick={expandOnClick ? () => row.toggleExpanded() : undefined}
|
||||
/>
|
||||
{row.getIsExpanded() && row.getCanExpand() && (
|
||||
<tr>
|
||||
{!disableSelect && <td />}
|
||||
<td colSpan={disableSelect ? cells.length : cells.length - 1}>
|
||||
{renderSubRow(row)}
|
||||
</td>
|
||||
</tr>
|
||||
)}
|
||||
{row.getIsExpanded() && renderSubRow(row)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue