Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
fix(task-selection): re-enable enter+tab pattern
Browse files Browse the repository at this point in the history
To re-enable the established pattern of 'select a
customer via enter and tabbing to next input,
should open dropdown automatically' the optimized
power-select needed some treatment.
  • Loading branch information
derrabauke committed Feb 13, 2023
1 parent 4c4d35e commit 7a89517
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/components/optimized-power-select/component.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import { action } from "@ember/object";
import Component from "@glimmer/component";

export default class OptimizedPowerSelectComponent extends Component {
get extra() {
return this.args.extra ?? {};
}

@action
onFocus({ actions, isOpen }) {
if (!isOpen) {
actions.open();
}
}
}
1 change: 1 addition & 0 deletions app/components/optimized-power-select/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
@triggerComponent={{component "optimized-power-select/trigger"}}
@onChange={{@onChange}}
@extra={{this.extra}}
@onFocus={{this.onFocus}}
/>

0 comments on commit 7a89517

Please sign in to comment.