-
-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autoselect first entry in paper-autocomplete #871
Comments
Try to use a computed property on Example: selected: computed('options.[]', function() {
let options = this.get('options');
return options.get('length') ? options.get('firstObject') : null;
}) Not sure if this will work if options is a promise. |
Do you mean something like defaultHighlighted option ember-power-select has support for. http://ember-power-select.com/docs/api-reference |
@miguelcobain What if I solely use the search attribute but not the options property |
@Sedrunum should be straight forward to expose as we rely on eps primitives throughout |
@miguelcobain what are your thoughts about exposing this as public API |
@miguelcobain from what I understand he wants to minimize the number of keypresses required to select an item. Currently, to select any items will require at least two keypresses (ArrowDown + Enter). If an item is highlighted when the dropdown opens up - will require only Enter to select it. |
@xomaczar Exactly. This is what I'm looking for. |
Is this still being discussed or will it be exposed as public API? |
Submit a PR with the feat. |
I've opened a PR to remove that null declaration so users can interact with the defaultHighlighted property. #901 it looks like it failed a check that all other PRs are failing at the moment |
@Sedrunum ember-paper supports |
Would it be possible to autoselect the first entry in the paper-autocomplete suggestions' list before any selection by the user as occured? This would make it possible to select this entry with one click on enter without having to use the arrow keys to select the entry in beforehand.
The text was updated successfully, but these errors were encountered: