kopia lustrzana https://github.com/shoelace-style/shoelace
fixes #457
rodzic
7454cc12a1
commit
15cb1cb746
|
@ -6,6 +6,10 @@ Components with the <sl-badge type="warning" pill>Experimental</sl-badge> badge
|
|||
|
||||
_During the beta period, these restrictions may be relaxed in the event of a mission-critical bug._ 🐛
|
||||
|
||||
## Next
|
||||
|
||||
- Fixed a bug in `sl-select` where no selection with `multiple` resulted in an incorrect value [#457](https://github.com/shoelace-style/shoelace/issues/457)
|
||||
|
||||
## 2.0.0-beta.43
|
||||
|
||||
- Added `?` to optional arguments in methods tables
|
||||
|
|
|
@ -159,6 +159,11 @@ export default class SlSelect extends LitElement {
|
|||
}
|
||||
|
||||
getValueAsArray() {
|
||||
// Single selects use '' as an empty selection value, so convert this to [] for an empty multi select
|
||||
if (this.multiple && this.value === '') {
|
||||
return [];
|
||||
}
|
||||
|
||||
return Array.isArray(this.value) ? this.value : [this.value];
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue