@ekzo-dev/bootstrap-addons 5.2.13 → 5.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ekzo-dev/bootstrap-addons",
|
|
3
3
|
"description": "Aurelia Bootstrap additional component",
|
|
4
|
-
"version": "5.2.
|
|
4
|
+
"version": "5.2.15",
|
|
5
5
|
"homepage": "https://github.com/ekzo-dev/aurelia-components/tree/main/packages/bootstrap-addons",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -12,13 +12,16 @@ bs-select {
|
|
|
12
12
|
cursor: default;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
width:
|
|
15
|
+
.dropdown-menu {
|
|
16
|
+
width: max-content;
|
|
17
|
+
min-width: 100%;
|
|
18
|
+
max-width: 100vw;
|
|
17
19
|
max-height: 50vh;
|
|
18
20
|
overflow-y: auto;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
|
-
.dropdown-item
|
|
23
|
+
.dropdown-item,
|
|
24
|
+
.dropdown-header {
|
|
22
25
|
white-space: normal;
|
|
23
26
|
}
|
|
24
27
|
|
|
@@ -45,12 +45,13 @@ Multiple.args = {
|
|
|
45
45
|
|
|
46
46
|
const LargeOptions: Story = (args) => ({
|
|
47
47
|
props: args,
|
|
48
|
+
template: '<bs-select value.bind="value" options.bind="options" label.bind="label" style="width: 400px"></bs-select>',
|
|
48
49
|
});
|
|
49
50
|
|
|
50
51
|
LargeOptions.args = {
|
|
51
52
|
options: Array.from({ length: 1000 }).map((v, i) => ({
|
|
52
|
-
value: i,
|
|
53
|
-
text: `Option ${i}`,
|
|
53
|
+
value: i.toString(),
|
|
54
|
+
text: `Option ${i} has long content which forces dropdown menu to scale larger that select box`,
|
|
54
55
|
})),
|
|
55
56
|
};
|
|
56
57
|
|
|
@@ -31,6 +31,16 @@ export class BsSelect extends BaseBsSelect implements ICustomElementViewModel {
|
|
|
31
31
|
|
|
32
32
|
optionsCount: number = 0;
|
|
33
33
|
|
|
34
|
+
deactivating: boolean = false;
|
|
35
|
+
|
|
36
|
+
binding() {
|
|
37
|
+
this.deactivating = false;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
unbinding() {
|
|
41
|
+
this.deactivating = true;
|
|
42
|
+
}
|
|
43
|
+
|
|
34
44
|
attached() {
|
|
35
45
|
if (this.multiple) {
|
|
36
46
|
this.#setHeight();
|
|
@@ -80,6 +90,8 @@ export class BsSelect extends BaseBsSelect implements ICustomElementViewModel {
|
|
|
80
90
|
}
|
|
81
91
|
|
|
82
92
|
get selectedOption(): ISelectOption | undefined {
|
|
93
|
+
if (this['__raw__'].deactivating) return;
|
|
94
|
+
|
|
83
95
|
const { matcher, value } = this;
|
|
84
96
|
let { options } = this;
|
|
85
97
|
|