maxOptions: Value for "unlimited" #254
Replies: 4 comments 1 reply
-
It took me a while to understand that there was a limit to the number of entries ! I propose that there be no default limit. The normal behavior of a select is to display everything. |
Beta Was this translation helpful? Give feedback.
-
not sure if you found the solution or not already, but based on implementation this option takes effect only if it is provided as a number TomSelect.new({ ..., maxOptions: false, ...}) I still think that it would be better to have it work the other way around as @pwbzh described - no limit by default, if the option is there - apply it. And obviously document it properly |
Beta Was this translation helpful? Give feedback.
-
That seems to be a mistake, for example.
|
Beta Was this translation helpful? Give feedback.
-
@oyejorge (or somebody else) why is there such a low default limit (50) on the maxOptions value? It seems to cause confusion that not all items are displayed, see the reactions in this thread and also #608. We recently switched from Select2 to TomSelect and our users also were confused by this, they thought lots of options were gone and didn't know they had to search. Granted just scrolling to a dropdown of 1000 items might not always be the quickest solution either, but it can give some inspiration on what to search for. If there is a limit and it is enforced then maybe TomSelect can show a message at the end: "More options available, use the search function". That way it is clear to the user that there actually are more results. Ps. Thanks for this nice select2 alternative without jQuery! |
Beta Was this translation helpful? Give feedback.
-
I'm suggesting a value for
maxOptions
that doesn't limit the number at all, and always shows every<option>
that's included in the<select>
: Maybenull
, or0
, or-1
etc.If this is already possible, it needs to be documented at https://tom-select.js.org/docs/ :-)
Beta Was this translation helpful? Give feedback.
All reactions