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

md-autocomplete compels you to click on dropdown item even typing the full word #3324

Closed
ivanhtp opened this issue Jun 17, 2015 · 6 comments
Closed
Assignees
Labels
needs: review This PR is waiting on review from the team
Milestone

Comments

@ivanhtp
Copy link

ivanhtp commented Jun 17, 2015

When typing on autocomplete, lets say "Alabama", the dropdown shows "Alabama", but if you don't click the dropdown item and just leave the focus, no object is selected.

I think if if you fully write an item, the directive should match with the object without require you to click it.

It could be bypassed in many ways, for example, when you blur the field, it automatically selects the first object of the list. Or if you type "Alaba.." and hit Enter, also selects the first item.

I tested this behavior with 11 people and 9 of them typed the full word without selecting the dropdown item. =/

@alexzielenski
Copy link

Have you tried the md-autoselect="true" attribute?

@ivanhtp
Copy link
Author

ivanhtp commented Jul 1, 2015

No I didn't, but it solves partially. It just focus the first selection but it dont apply it on blur.
But with the autoselect at least it selects it when you press enter.

There should be an option to select the first item on blur.
http://codepen.io/ivan_htp/pen/eNVvxN

@alexzielenski
Copy link

http://codepen.io/anon/pen/rVJyRO

It's working by selecting the first attribute when I hit enter, but it would be bad UX to do so on blur.

@ivanhtp
Copy link
Author

ivanhtp commented Jul 1, 2015

Its hard to say. Is a bad UX if you write just some characters, but if you
write the full word (eg. Alabama) and blur the field, it should select your
option.

On Wed, Jul 1, 2015 at 5:47 PM Alex Zielenski notifications@github.com
wrote:

http://codepen.io/anon/pen/rVJyRO

It's working by selecting the first attribute when I hit enter, but it
would be bad UX to do so on blur.


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

@ThomasBurleson ThomasBurleson modified the milestone: Backlog Jul 6, 2015
@robertmesserle robertmesserle modified the milestones: 0.11.0, Backlog Jul 6, 2015
@robertmesserle
Copy link
Contributor

@ivanhtp I believe this is how it originally functioned, but was changed based on user feedback. I'm going to add a way to opt in/out for this behavior.

@ivanhtp
Copy link
Author

ivanhtp commented Jul 17, 2015

Good to know @robertmesserle, thanks for your feedback!

robertmesserle pushed a commit that referenced this issue Jul 20, 2015
When enabled, an exact match in the `searchText` will automatically
select a matching item if (a) there is exactly one match found and (b)
the `searchText` matches the display value exactly

Closes #3324
@robertmesserle robertmesserle added the needs: review This PR is waiting on review from the team label Jul 20, 2015
robertmesserle pushed a commit that referenced this issue Jul 20, 2015
When enabled, an exact match in the `searchText` will automatically
select a matching item if (a) there is exactly one match found and (b)
the `searchText` matches the display value exactly

Closes #3324
robertmesserle pushed a commit that referenced this issue Jul 20, 2015
When enabled, an exact match in the `searchText` will automatically
select a matching item if (a) there is exactly one match found and (b)
the `searchText` matches the display value exactly

Closes #3324
robertmesserle pushed a commit that referenced this issue Jul 21, 2015
When enabled, an exact match in the `searchText` will automatically
select a matching item if (a) there is exactly one match found and (b)
the `searchText` matches the display value exactly

Closes #3324
robertmesserle pushed a commit that referenced this issue Jul 21, 2015
When enabled, an exact match in the `searchText` will automatically
select a matching item if (a) there is exactly one match found and (b)
the `searchText` matches the display value exactly

Closes #3324
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: review This PR is waiting on review from the team
Projects
None yet
Development

No branches or pull requests

4 participants