Skip to content

Commit

Permalink
Merge pull request #340 from liorbentov/master
Browse files Browse the repository at this point in the history
Make non-sortable column default icon hidden
  • Loading branch information
ryanlanciaux committed Mar 4, 2016
2 parents 357ebee + 48304b8 commit 610c0db
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 610c0db

Please sign in to comment.