Skip to content

Commit

Permalink
change default sorting behavior to include three options - asc, desc …
Browse files Browse the repository at this point in the history
…and no sort
  • Loading branch information
Liza Katz committed Feb 25, 2019
1 parent 430b4c6 commit 4e08b08
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/basic_table/in_memory_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,18 @@ export class EuiInMemoryTable extends Component {
size: pageSize
} = page;

const {
let {
field: sortField,
direction: sortDirection
} = sort;

if (this.state.sortField === sortField
&& this.state.sortDirection === 'desc'
&& sortDirection === 'asc') {
sortField = '';
sortDirection = '';
}

this.setState({
pageIndex,
pageSize,
Expand Down

0 comments on commit 4e08b08

Please sign in to comment.