diff --git a/src/components/datatable/HeaderCell.js b/src/components/datatable/HeaderCell.js index 1d33d1a4c4..3da2e157a1 100644 --- a/src/components/datatable/HeaderCell.js +++ b/src/components/datatable/HeaderCell.js @@ -15,11 +15,8 @@ export class HeaderCell extends Component { onClick(e) { if(this.props.sortable) { - let targetNode = e.target.nodeName; - if(targetNode === 'INPUT' || targetNode === 'BUTTON' || targetNode === 'A' || (DomHandler.hasClass(e.target, 'ui-clickable'))) { - return; - } - else { + let targetNode = e.target; + if(DomHandler.hasClass(targetNode, 'ui-sortable-column') || DomHandler.hasClass(targetNode, 'ui-column-title') || DomHandler.hasClass(targetNode, 'ui-sortable-column-icon')) { this.props.onSort({ originalEvent: e, sortField: this.props.field