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
Before opening an issue, please search for duplicates (opened and closed) https://github.com/valor-software/ngx-bootstrap/issues There's no need to open an issue here if you want to ask general question, use StackOverflow or Slack instead
Bug description: The Typeahead component has a typeaheadOptionsLimit attribute, documented as follows:
Type: number
maximum length of options items list. The default value is 20
Featuring such a maximum is good, except:
There is no way to set no maximum (at least, none documented).
When that maximum is exceeded, the remaining options are quietly ignored.
While the component is unspecified, this will certainly break expectations, since the maximum has a default. In other words:
Developers will unknowingly set an implicit limit, unless they are aware of the attribute, so there is no prevention.
Users get no indication at all when the maximum is exceeded, so there is no runtime handling.
Developers should realize whenever they are setting such a limit. Otherwise, all options should be offered somehow, or at least users should be notified that some options are missing.
Possible solutions/mitigations:
Make the typeaheadOptionsLimit parameter mandatory
Do not set a limit by default
Add some indication when options are discarded or hidden. This could be done by adding an element offering to show more, or just a pseudo-option at the bottom with a label like "13 extra options are hidden." Ideally, though, if the options are for example states of the U.S.A., the label would refer to states ("13 extra states are hidden; try refining your search term."), which would require an attribute to set usage-specific labels. A generic label could hardly by accessible, except in supported locales. There are - however - international conventions which could help for locales which don't have a generic label : the ellipsis ("…") and the plus sign ("+") could be ultimate fallback labels for a pseudo-option to show more options, although I can't confirm that these conventions are known in all cultures.
Failing that, support defining a footer displayed after results, as Typeahead.js does with its templates option.
Considering that Twitter presents the inspiration for Typeahead as an autocompletion widget with suggestions, it would surely help to portray Typeahead as a helper which suggests values, rather than as a filter which lists options supposed to be exhaustive. This could be done for developers by changing the documentation terminology and/or for users by adding an element, like a "Suggestions" header.
The first 2 are unfortunately not retroactive solutions.
Before opening an issue, please search for duplicates (opened and closed) https://github.com/valor-software/ngx-bootstrap/issues There's no need to open an issue here if you want to ask general question, use StackOverflow or Slack instead
Bug description:
The Typeahead component has a typeaheadOptionsLimit attribute, documented as follows:
Featuring such a maximum is good, except:
While the component is unspecified, this will certainly break expectations, since the maximum has a default. In other words:
Plunker/StackBlitz that reproduces the issue: https://mw2qwy--run.stackblitz.io
(try search term "a")
Using Plunkr, StackBlitz is the best way to show your issue. Issues without link to an example of reproduction might be closed.
You can use one of starter templates:
Plunkr: https://plnkr.co/edit/0NipkZrnckZZROAcnjzB?p=preview
StackBlitz: https://stackblitz.com/edit/ngx-bootstrap?file=app%2Fapp.module.ts
Versions of ngx-bootstrap, Angular, and Bootstrap:
ngx-bootstrap: 5.2.0
Angular: 8.2.0
Bootstrap: 3.4.1
Build system: Angular CLI, System.js, webpack, starter seed: Angular CLI
Expected behavior
Developers should realize whenever they are setting such a limit. Otherwise, all options should be offered somehow, or at least users should be notified that some options are missing.
Possible solutions/mitigations:
The first 2 are unfortunately not retroactive solutions.
Here are some related Typeahead.js issues:
...and a related corejs-typeahead issue:
The text was updated successfully, but these errors were encountered: