pull/463/head
Cory LaViska 2021-06-04 08:56:35 -04:00
rodzic 7454cc12a1
commit 15cb1cb746
2 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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];
}