Skip to content

Commit

Permalink
CDC #271 - Updating EmbeddedList component to allow "tableProps" prop…
Browse files Browse the repository at this point in the history
… to pass through to DataTable
  • Loading branch information
dleadbetter committed Sep 26, 2024
1 parent a1d8c0d commit 2dabe0a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/semantic-ui/src/components/EmbeddedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ type Props = DataTableProps & ColumnSelectorProps & {
/**
* Callback fired when a table row is dragged.
*/
onDrag?: (dragIndex: number, hoverIndex: number) => void
onDrag?: (dragIndex: number, hoverIndex: number) => void,

/**
* Props to apply to the underlying Table component.
*/
tableProps?: any
};

type State = {
Expand Down Expand Up @@ -178,7 +183,8 @@ class EmbeddedList extends Component<Props, State> {
sortDirection={this.state.sortDirection}
tableProps={{
celled: true,
sortable: !this.props.onDrag
sortable: !this.props.onDrag,
...(this.props.tableProps || {})
}}
selectable={this.props.selectable}
onRowSelect={this.props.onRowSelect}
Expand Down

0 comments on commit 2dabe0a

Please sign in to comment.