Add removing sort by click
This commit is contained in:
parent
e99b771c28
commit
754c976735
1 changed files with 3 additions and 1 deletions
|
|
@ -38,7 +38,9 @@ export default class AdminIndexesItemDataController extends Controller {
|
|||
|
||||
@action
|
||||
onSort(newSort) {
|
||||
if (`${newSort}:asc` === this.sort) {
|
||||
if (`${newSort}:desc` === this.sort) {
|
||||
this.sort = null;
|
||||
} else if (`${newSort}:asc` === this.sort) {
|
||||
this.sort = `${newSort}:desc`;
|
||||
} else {
|
||||
this.sort = `${newSort}:asc`;
|
||||
|
|
|
|||
Loading…
Reference in a new issue