/* eslint-disable no-console */ import { FunctionComponent } from 'react'; import { ActionsColumn, Caption, IActions, Table, TableGridBreakpoint, Td, Th, Thead, Tr } from '@patternfly/react-table'; import { CellMeasurerCache, CellMeasurer } from 'react-virtualized'; import { AutoSizer, VirtualTableBody } from '@patternfly/react-virtualized-extension'; export const ActionsExample: FunctionComponent = () => { interface RowType { disableActions: boolean; id: string; cells: string[]; } const rows: RowType[] = []; for (let i = 0; i < 100; i++) { rows.push({ disableActions: i % 3 === 2, id: `actions-row-${i}`, cells: [`one-${i}`, `two-${i}`, `three-${i}`, `four-${i}`, `five-${i}`] }); } const columns = ['Name', 'Namespace', 'Labels', 'Status', 'Pod Selector']; const actions: IActions = [ { title: 'Some action', onClick: (_event, rowId, _rowData, _extra) => console.log('clicked on Some action, on row: ', rowId) }, { title:
| {columns[0]} | {columns[1]} | {columns[2]} | {columns[3]} | {columns[4]} |
|---|