Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ class Table extends Component<TableProps, {}> {
actionsToggle,
onFavorite,
canSortFavorites,
variant,
// order of columns: Collapsible | Selectable | Favoritable
firstUserColumnIndex: [onCollapse, onSelect, onFavorite].filter((callback) => callback).length
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,25 @@ describe('Table', () => {
expect(asFragment()).toMatchSnapshot();
});

test('Compact table with Radio select', () => {
const onSelect: OnSelect = () => undefined;
const { asFragment } = render(
<Table
aria-label="Compact table with radio"
variant={TableVariant.compact}
selectVariant={RowSelectVariant.radio}
onSelect={onSelect}
cells={columns}
rows={rows}
>
<TableHeader />
<TableBody />
</Table>
);

expect(asFragment()).toMatchSnapshot();
});

test('Control text table', () => {
const controlTextColumns: ICell[] = [
{ ...(columns[0] as object), transforms: [nowrap] },
Expand Down
Loading
Loading