Skip to content

Commit 71b661b

Browse files
committed
add onHeaderClick on column properties(fix test)
1 parent 7354ba1 commit 71b661b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Table.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ export default class Table extends React.Component {
225225
key: column.key,
226226
className: column.className || '',
227227
children: column.title,
228-
onClick: column.onHeaderClick,
229228
};
230229
if (column.children) {
231230
this.getHeaderRows(column.children, currentRow + 1, rows);
@@ -236,6 +235,9 @@ export default class Table extends React.Component {
236235
if ('rowSpan' in column) {
237236
cell.rowSpan = column.rowSpan;
238237
}
238+
if (typeof column.onHeaderClick === 'function') {
239+
cell.onClick = column.onHeaderClick;
240+
}
239241
if (cell.colSpan !== 0) {
240242
rows[currentRow].push(cell);
241243
}

0 commit comments

Comments
 (0)