bootstrap-select icon indicating copy to clipboard operation
bootstrap-select copied to clipboard

Max options documentation?

Open gitsocko opened this issue 12 years ago • 4 comments

I see @caseyjhol added a max options feature (#388 > #493), but I'm not seeing how to use it. A quick explanation on usage for this feature would be appreciated.

gitsocko avatar Jun 12 '14 11:06 gitsocko

Have you tried using data-maxOptions="5" on the select box so like:

<select name="someName" data-maxOptions="5" class="selectpicker">

truckingsim avatar Jun 12 '14 12:06 truckingsim

Sorry for the lack of activity lately - I've been busy working on a different project. The next phase in our UI, though, will require some updates to bootstrap-select. I'll be back with regular updates soon, including updates to the documentation.

caseyjhol avatar Jun 12 '14 23:06 caseyjhol

Also, use data-max-options.

e.g.

<select data-max-options="2">
    <option>One</option>
    <optgroup label="Limit 2" data-max-options="2">
        <option>Two</option>
        <option>Three</option>
        <option>Four</option>
    </optgroup>
</select>

caseyjhol avatar Jun 13 '14 06:06 caseyjhol

Works perfectly, thanks!

gitsocko avatar Jun 13 '14 12:06 gitsocko