Skip to content

Commit

Permalink
[DataTable] Fix hide defaultColumn (aces#8996)
Browse files Browse the repository at this point in the history
When hide defaultColumn is set to true the DataTable hides the
table header but doesn't hide the column in the datatable. This
fixes the bug so that the column is hidden and not just the column
header.
  • Loading branch information
driusan authored Dec 6, 2023
1 parent cade690 commit 1c98962
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jsx/DataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,9 @@ class DataTable extends Component {
const rowIndexDisplay = index[i].Content;
rows.push(
<tr key={'tr_' + rowIndex} colSpan={headers.length}>
{this.props.hide.defaultColumn === true ? null : (
<td key={'td_' + rowIndex}>{rowIndexDisplay}</td>
)}
{curRow}
</tr>
);
Expand Down

0 comments on commit 1c98962

Please sign in to comment.