From 94754d7ef0eb359134058a5b0586e86f66ac41f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87a=C4=9Fatay=20=C3=87ivici?= Date: Tue, 31 Oct 2017 16:14:53 +0300 Subject: [PATCH] Fixed #133 --- src/components/datatable/HeaderCell.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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