@ekzo-dev/bootstrap-addons 5.2.28 → 5.2.29

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.28",
4
+ "version": "5.2.29",
5
5
  "homepage": "https://github.com/ekzo-dev/aurelia-components/tree/main/packages/bootstrap-addons",
6
6
  "repository": {
7
7
  "type": "git",
@@ -84,9 +84,13 @@ export class BsSelect extends BaseBsSelect implements ICustomElementViewModel {
84
84
  }
85
85
 
86
86
  get valueText(): string {
87
- // if (this.multiple) {
88
- //
89
- // }
87
+ if (this.multiple) {
88
+ const { options, value } = this;
89
+
90
+ return (value as [])
91
+ .map((val) => (options as ISelectOption[]).find((option) => option.value === val).text)
92
+ .join(', ');
93
+ }
90
94
 
91
95
  const { selectedOption, emptyOption } = this;
92
96
 
@@ -134,19 +138,20 @@ export class BsSelect extends BaseBsSelect implements ICustomElementViewModel {
134
138
 
135
139
  const isEntries = Array.isArray(options[0]);
136
140
  let option = (options as Array<ISelectOption | readonly [unknown, string]>).find((option) => {
137
- const currentValue: unknown = isEntries ? option[0] : (option as ISelectOption).value;
141
+ const optionValue: unknown = isEntries ? option[0] : (option as ISelectOption).value;
138
142
 
139
- if (currentValue == emptyValue) {
143
+ if (optionValue == emptyValue) {
140
144
  emptyOption = {
141
- value: currentValue,
142
- text: isEntries ? option[1] : (option as ISelectOption).text,
145
+ value: optionValue,
146
+ text: isEntries ? (option[1] as string) : (option as ISelectOption).text,
143
147
  } as ISelectOption;
144
148
  }
145
149
 
146
- return matcher ? matcher(value, currentValue) : value === currentValue;
150
+ return matcher ? matcher(value, optionValue) : value === optionValue;
147
151
  });
148
152
 
149
- option = isEntries && option !== undefined ? { value: option[0], text: option[1] } : (option as ISelectOption);
153
+ option =
154
+ isEntries && option !== undefined ? { value: option[0], text: option[1] as string } : (option as ISelectOption);
150
155
 
151
156
  // update value next tick
152
157
  const foundValue = option?.value;