mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
fixes #457
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user