diff --git a/scripts/griddle.jsx b/scripts/griddle.jsx index f3318bbc..35e07f98 100755 --- a/scripts/griddle.jsx +++ b/scripts/griddle.jsx @@ -612,6 +612,9 @@ var Griddle = React.createClass({ getCurrentSortAscending: function(){ return this.props.useExternal ? this.props.externalSortAscending : this.state.sortDirection === 'asc'; }, + getCurrentSortDirection: function getCurrentSortDirection() { + return this.props.useExternal ? (this.props.externalSortAscending ? 'asc' : 'desc') : this.state.sortDirection; + }, getCurrentMaxPage: function(){ return this.props.useExternal ? this.props.externalMaxPage : this.state.maxPage; }, @@ -622,7 +625,7 @@ var Griddle = React.createClass({ changeSort: this.changeSort, sortColumn: this.getCurrentSort(), sortAscending: this.getCurrentSortAscending(), - sortDirection: this.state.sortDirection, + sortDirection: this.getCurrentSortDirection(), sortAscendingClassName: this.props.sortAscendingClassName, sortDescendingClassName: this.props.sortDescendingClassName, sortAscendingComponent: this.props.sortAscendingComponent,