File tree 3 files changed +30
-0
lines changed
3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 2663
2663
2664
2664
that . createView ( false ) ;
2665
2665
}
2666
+ // toggle to close the dropdown if it is currently open
2667
+ if ( version . major > 4 && that . $menu . hasClass ( classNames . SHOW ) ) {
2668
+ that . $menu . removeClass ( classNames . SHOW ) ;
2669
+ }
2666
2670
}
2667
2671
2668
2672
this . $button . on ( 'click.bs.dropdown.data-api' , function ( e ) {
Original file line number Diff line number Diff line change 326
326
</ select >
327
327
</ div >
328
328
</ div >
329
+
330
+ < hr >
331
+ < div class ="form-group row ">
332
+ < label class ="col-lg-4 control-label "> allow clear and prevent menu open</ label >
333
+ < div class ="col-lg-8 ">
334
+ < select id ="allow-clear " class ="selectpicker " data-allow-clear ="true ">
335
+ < option > One</ option >
336
+ < option > Two</ option >
337
+ < option > Three</ option >
338
+ </ select >
339
+ </ div >
340
+ </ div >
341
+
329
342
</ div >
330
343
331
344
< script src ="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js "> </ script >
Original file line number Diff line number Diff line change @@ -336,6 +336,19 @@ <h5>Set the title attribute on options to display alternative text when the opti
336
336
</ select >
337
337
</ div >
338
338
</ div >
339
+
340
+ < hr >
341
+ < div class ="form-group row ">
342
+ < label class ="col-lg-4 control-label "> allow clear and prevent menu open</ label >
343
+ < div class ="col-lg-8 ">
344
+ < select id ="allow-clear " class ="selectpicker " data-allow-clear ="true ">
345
+ < option > One</ option >
346
+ < option > Two</ option >
347
+ < option > Three</ option >
348
+ </ select >
349
+ </ div >
350
+ </ div >
351
+
339
352
</ div >
340
353
341
354
< script src ="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js "> </ script >
You can’t perform that action at this time.
0 commit comments