File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -88,4 +88,17 @@ <h2 class="bd-title">
88
88
</ select >
89
89
</ div >
90
90
</ div >
91
+
92
+ < div class ="mb-3 row ">
93
+ < label class ="col-sm-3 text-end "> Dropdown width </ label >
94
+
95
+ < div class ="col-sm-9 ">
96
+ < select id ="select4 " data-width ="200 ">
97
+ < option value ="1 "> This is the first option and value is 1</ option >
98
+ < option value ="2 "> This is the second option and value is 2</ option >
99
+ < option value ="3 "> This is the third option and value is 3</ option >
100
+ < option value ="4 "> This is the fourth option and value is 4</ option >
101
+ </ select >
102
+ </ div >
103
+ </ div >
91
104
</ div >
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ export default class Example {
4
4
ms1 ?: MultipleSelectInstance ;
5
5
ms2 ?: MultipleSelectInstance ;
6
6
ms3 ?: MultipleSelectInstance ;
7
+ ms4 ?: MultipleSelectInstance ;
7
8
8
9
mount ( ) {
9
10
this . ms1 = multipleSelect ( '#select1' , {
@@ -14,27 +15,29 @@ export default class Example {
14
15
} ) as MultipleSelectInstance ;
15
16
16
17
this . ms2 = multipleSelect ( '#select2' , {
17
- autoAdjustDropWidthByTextSize : true ,
18
18
autoAdjustDropHeight : true ,
19
19
position : 'top' ,
20
20
showOkButton : true ,
21
21
} ) as MultipleSelectInstance ;
22
22
23
23
this . ms3 = multipleSelect ( '#select3' , {
24
- autoAdjustDropWidthByTextSize : true ,
25
24
autoAdjustDropHeight : true ,
26
25
filter : true ,
27
26
position : 'top' ,
28
27
} ) as MultipleSelectInstance ;
28
+
29
+ this . ms4 = multipleSelect ( '#select4' ) as MultipleSelectInstance ;
29
30
}
30
31
31
32
unmount ( ) {
32
33
// destroy ms instance(s) to avoid DOM leaks
33
34
this . ms1 ?. destroy ( ) ;
34
35
this . ms2 ?. destroy ( ) ;
35
36
this . ms3 ?. destroy ( ) ;
37
+ this . ms4 ?. destroy ( ) ;
36
38
this . ms1 = undefined ;
37
39
this . ms2 = undefined ;
38
40
this . ms3 = undefined ;
41
+ this . ms4 = undefined ;
39
42
}
40
43
}
You can’t perform that action at this time.
0 commit comments