-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Added reopen-on-click typeahead option (Issue #759) #5428
base: master
Are you sure you want to change the base?
Conversation
Added code to allow to reopen the typeahead list on click, as per issue angular-ui#759. This requires adding the "typeahead-reopen-on-click" boolean attribute to the typeahead input, example: <input type="text" uib-typeahead="obj for obj in objs" typeahead-reopen-on-click="true"> Only works on typeahead-editable="true" since otherwise the view value is erased on blur.
prevent modelCtrl.$viewValue.length from returning an error if modelCtrl.$viewValue is undefined
This can't be done currently with |
No, min-length only determines how many characters are needed for the typeahead to make a query. Even if it is 0, normally the typeahead list will not reopen until the input text is modified. |
What about programmatically controlling it with |
|
My preference would be for a PR implementing that as a two-way bound variable - that would then make any custom programmatic opening/closing possible on the user side. |
That seems more complicated to implement, but sounds like a great idea. I'll see if I can make it work. |
Is this on the npm repository? I have the latest version and it doesn't seem to be there |
@AntiAsko, this is not currently on npm as it is an open PR which has not been merged. The PR still needs work before it can be merged. Feel free to take a look through the comments for the proposed changes, and finish up the PR if you have time so that we can get it merged in. |
Any progress on this. Much needed!
|
Same here. Would love the typeahead-reopen-on-click |
Added code to allow to reopen the typeahead list on click, as per issue #759. This requires adding the "typeahead-reopen-on-click" boolean attribute to the typeahead input, example:
<input type="text" uib-typeahead="obj for obj in objs" typeahead-reopen-on-click="true">
Only works on typeahead-editable="true" since otherwise the view value is erased on blur. The
element[0] === evt.target
comparison makes sure only the clicked typeahead's list is reopened.