Skip to content

Commit

Permalink
Change optional open to debounce
Browse files Browse the repository at this point in the history
Maybe the problem was a double-open?
  • Loading branch information
backspace committed Jun 24, 2020
1 parent a940fe1 commit f892486
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ui/app/components/global-search/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { task } from 'ember-concurrency';
import EmberObject, { action, computed, set } from '@ember/object';
import { alias } from '@ember/object/computed';
import { inject as service } from '@ember/service';
import { run } from '@ember/runloop';
import { debounce, run } from '@ember/runloop';
import Searchable from 'nomad-ui/mixins/searchable';
import classic from 'ember-classic-decorator';

Expand Down Expand Up @@ -119,9 +119,7 @@ export default class GlobalSearchControl extends Component {
const triggerIsNotActive = !targetClassList.contains('ember-power-select-trigger--active');

if (targetIsTrigger && triggerIsNotActive) {
run.next(() => {
select.actions.open();
});
debounce(this, this.open, 150);
}
}

Expand Down

0 comments on commit f892486

Please sign in to comment.