Ajax-Bootstrap-Select icon indicating copy to clipboard operation
Ajax-Bootstrap-Select copied to clipboard

Add optgroup support

Open truckingsim opened this issue 10 years ago • 9 comments

truckingsim avatar Nov 05 '14 22:11 truckingsim

I am interested in this feature too!

pimduijst avatar Sep 23 '19 10:09 pimduijst

I was looking for the same feature in this plugin to have options displayed along with the optgroup tag to sort in groups. I was wondering if this feature would be included any time soon? Thanks

ribubrar avatar Oct 02 '19 03:10 ribubrar

@markcarver @truckingsim I made some changes in the plugin code and now it locally works for the different categories to have an tag. I wondered if I could contribute this feature to your plugin. Cheers!

ribubrar avatar Oct 03 '19 03:10 ribubrar

If you found a way to do this without changing the data structure I'm open to that (i.e nesting levels). My worry with supporting this is how to do without changing the nesting levels or if we do change the structure then we need to do a major release.

truckingsim avatar Oct 03 '19 13:10 truckingsim

I initially changed the data structure to implement 'optgroup' but as you suggested trying nesting the levels, I managed to have a workaround and it worked fine using the same. It needed a couple of changes only.

ribubrar avatar Oct 04 '19 00:10 ribubrar

feel free to open a pr i'll look it over

truckingsim avatar Oct 04 '19 15:10 truckingsim

Awesome, before I could create a PR, @truckingsim I had one question, when I am trying to load the dropdown options using ajax, my options are getting displayed but I am unable to do the live search. Could you please check if my code misses any key parameters that hinder live search.

When I change the class from selectpicker to bootstrap-select, it works as expected.

`

<select class="selectpicker" multiple data-selected-text-format="count" data-actions-box="true" data-live-search="true" data-show-tick="false" data-live-search-style="contains">
</select>

ribubrar avatar Oct 06 '19 20:10 ribubrar

Is there any update on this? I would love to have this feature...

engin-can avatar Mar 02 '20 08:03 engin-can

Me too!

ctsDevel avatar Jun 10 '20 14:06 ctsDevel