Skip to content

Commit

Permalink
make non-sortable column default icon hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
liorbentov committed Feb 7, 2016
1 parent 50f0ac6 commit 48304b8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/gridTitle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ var GridTitle = React.createClass({

var nodes = this.props.columnSettings.getColumns().map(function(col, index){
var columnSort = "";
var sortComponent = that.props.sortSettings.sortDefaultComponent;
var columnIsSortable = that.props.columnSettings.getMetadataColumnProperty(col, "sortable", true);
var sortComponent = columnIsSortable ? that.props.sortSettings.sortDefaultComponent : null;

if(that.props.sortSettings.sortColumn == col && that.props.sortSettings.sortAscending){
columnSort = that.props.sortSettings.sortAscendingClassName;
Expand All @@ -57,9 +58,7 @@ var GridTitle = React.createClass({
sortComponent = that.props.useGriddleIcons && that.props.sortSettings.sortDescendingComponent;
}


var meta = that.props.columnSettings.getColumnMetadataByName(col);
var columnIsSortable = that.props.columnSettings.getMetadataColumnProperty(col, "sortable", true);
var displayName = that.props.columnSettings.getMetadataColumnProperty(col, "displayName", col);

columnSort = meta == null ? columnSort : (columnSort && (columnSort + " ")||columnSort) + that.props.columnSettings.getMetadataColumnProperty(col, "cssClassName", "");
Expand Down

0 comments on commit 48304b8

Please sign in to comment.