Skip to content
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

[FEATURE] Typing in focused selects highlight or select the first match as native selects do #316

Merged
merged 5 commits into from
Feb 11, 2016

Conversation

cibernox
Copy link
Owner

No description provided.

@cibernox
Copy link
Owner Author

Video of the new feature: http://quick.as/zDaQSXX2V

Typing on selects without searchbox, or those with seachbox that are closed behaves like native selects and select or highlight the first match. That search is reset after 1s of idle time.

So typing "tw" will select/highlight (or highlight if the select is open) the option two, but typing "tw" + (wait 1s) + "o" will end up selecting/highlighting one.

cibernox added a commit that referenced this pull request Feb 11, 2016
[FEATURE] Typing in focused selects highlight or select the first match as native selects do
@cibernox cibernox merged commit 207d7d5 into master Feb 11, 2016
@cibernox cibernox deleted the focused-keyboard-selection branch February 11, 2016 17:29
@jeffstagedoor
Copy link

Thanks for that new feature!
Unfortunately this only works with a simple one-dimentional option-list.

I for example have this as source:
gender: [
{"code": 0, "label": 'female'},
{"code": 1, "label": 'male'},
{"code": 2, "label": 'other'},
]

with:

{{#power-select
options=genderList
searchEnabled=false
searchField='label'
selected=genderSelected
onchange=(action "selectGender")
as |gender|
}}
{{gender.label}}
{{/power-select}}

which will not select anything when typing a matching letter.

Maybe it would be possible to specify the field to 'search' for like I did, even if the normal search is disabled?

@cibernox
Copy link
Owner Author

cibernox commented Mar 4, 2016

That is exactly how it works. Are you in the latest version?

@jeffstagedoor
Copy link

Yes, I updated yesterday, so I'm on 0.8.6
Couldn't get it to work though.
I will do further test tomorrow, maybe it only didn't match because of typing lowercase while having Camelcased source-data.

@cibernox
Copy link
Owner Author

cibernox commented Mar 4, 2016

The feature was added in 0.9. Try that one.
On 4 Mar 2016 2:46 a.m., "jeffstagedoor" notifications@github.com wrote:

Yes, I updated yesterday, so I'm on 0.8.6
Couldn't get it to work though.
I will do further test tomorrow, maybe it only didn't match because of
typing lowercase while having Camelcased source-data.


Reply to this email directly or view it on GitHub
#316 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants