Skip to content
Merged
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
4 changes: 4 additions & 0 deletions packages/react-table/src/components/Table/Tr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export interface TrProps extends Omit<React.HTMLProps<HTMLTableRowElement>, 'onR
isStriped?: boolean;
/** Flag indicating the row will act as a border. This is typically used for a table with a nested and sticky header. */
isBorderRow?: boolean;
/** Flag indicating the row is controlling the expansion of another row. */
isControlRow?: boolean;
/** An event handler for the row */
onRowClick?: (event?: React.KeyboardEvent | React.MouseEvent) => void;
/** Flag indicating that the row is selectable */
Expand All @@ -50,6 +52,7 @@ const TrBase: React.FunctionComponent<TrProps> = ({
isRowSelected = false,
isStriped = false,
isBorderRow = false,
isControlRow = false,
innerRef,
ouiaId,
ouiaSafe = true,
Expand Down Expand Up @@ -100,6 +103,7 @@ const TrBase: React.FunctionComponent<TrProps> = ({
isRowSelected && styles.modifiers.selected,
isStriped && styles.modifiers.striped,
isBorderRow && styles.modifiers.borderRow,
isControlRow && styles.tableControlRow,
resetOffset && styles.modifiers.firstCellOffsetReset
)}
hidden={rowIsHidden}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const TableCompoundExpandable: React.FunctionComponent = () => {
const isRowExpanded = !!expandedCellKey;
return (
<Tbody key={repo.name} isExpanded={isRowExpanded}>
<Tr>
<Tr isControlRow>
<Td width={25} dataLabel={columnNames.name} component="th">
<a href="#">{repo.name}</a>
</Td>
Expand Down