You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If 0 (zero) is passed as a model value to the typeahead formatter it is returned as a string rather than being formatted. In my example the formatting function checks whether an object with an id matching the input exists in an array and if so returns the object name. 0 is a valid input but as 0 is falsy the typeahead _formatItemForInput function returns the input as a string.
Link to minimally-working plunker that reproduces the issue:
Bug description:
If 0 (zero) is passed as a model value to the typeahead formatter it is returned as a string rather than being formatted. In my example the formatting function checks whether an object with an id matching the input exists in an array and if so returns the object name.
0
is a valid input but as0
is falsy the typeahead_formatItemForInput
function returns the input as a string.Link to minimally-working plunker that reproduces the issue:
http://plnkr.co/edit/NHCHep7OuiceRi0rRdAa?p=preview
Version of Angular, ng-bootstrap, and Bootstrap:
Angular: 5.0.2
ng-bootstrap: 1.1.2
Bootstrap: 4.0.0
The text was updated successfully, but these errors were encountered: