Reputation: 33
I am using YUI 3 to create an autocomplete box in which I would like to force the selection and require the user to select a result from the container, or else the input field is cleared of whatever value they have typed in manually.
forceSelection
was a feature in the YUI 2 Autocomplete widget
and info here.
But... it does not look like it has been added to the new YUI
3 version yet.here's the open ticket.
I would just use YUI 2 Autocomplete, however I am already using other improved features that came with YUI 3.
Is there an easy way to implement this manually for YUI 3?
Upvotes: 3
Views: 1105
Reputation: 377
Ryan Grove from the YUI team recently posted this:
This feature is currently targeted for 3.5.0. In the meantime, it's not too hard to implement forced selection by hooking into AutoComplete events. Here's a very basic example that you could build on: http://jsfiddle.net/rgrove/aJcqt/
Upvotes: 3