Skip to content

Commit

Permalink
Fix #103941
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Nov 9, 2020
1 parent 4ecf3f8 commit 7509a01
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2167,13 +2167,15 @@ export class ChangeSortAction extends Action {

this.query = Query.parse('');
this.enabled = false;
this.checked = false;
this._register(onSearchChange(this.onSearchChange, this));
}

private onSearchChange(value: string): void {
const query = Query.parse(value);
this.query = new Query(query.value, this.sortBy || query.sortBy, query.groupBy);
this.enabled = !!value && this.query.isValid() && !this.query.equals(query);
this.enabled = !!value && this.query.isValid();
this.checked = this.enabled && this.query.equals(query);
}

run(): Promise<void> {
Expand Down

0 comments on commit 7509a01

Please sign in to comment.