-
Notifications
You must be signed in to change notification settings - Fork 540
feature: add option to automatically 'select' the option, if it is the only option. #136
Comments
I didn't get the "complete if there is only one option matching the query" part. Would you mind explaining it better? |
The promise that you pass to get the list of item, given a query. If the returned array has a length of 1, then automatically select that entry. So if I search "bana" and the function returns ["banana"], which has a length of 1, then automatically select(1), so the user can hit tab and continue adding tags without having to either hit down (far from home row), click, or finish typing the entire word. |
I get it now. Perhaps there could be an option to make the directive always select the first suggestion, regardless of how many items have returned? What do you think? |
That would also hint to the user that they could use the up and down key to On Wed, Apr 30, 2014 at 12:44 AM, Michael Benford
|
Add an option to make the first tag suggestion be automatically selected as soon as it appears. The default value is false. Closes mbenford#136
Add an option to make the first tag suggestion be automatically selected as soon as it appears. The default value is false. Closes mbenford#136
In google auto completes you can hit tab to complete until a disambiguate.
This is maybe tricky... or not... but at the very least it would be nice to complete if there is only one option matching the query.
Through my silly foray into reinventing your plugin for no reason, because I found imaginary issues, I added this feature, so I could re-add it, if it seems reasonable.
So if the concept of the feature is acceptable, I'll write a test to cover it, then make a pull request.
The text was updated successfully, but these errors were encountered: