fix a bug in select not updating when value has changed (#181)

* fix a bug in select not updating when value has changed

* prettier
This commit is contained in:
Konnor Rogers
2024-10-03 10:27:17 -04:00
committed by GitHub
parent 4158ca903a
commit 63df4f9631
2 changed files with 2 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ During the alpha period, things might break! We take breaking changes very serio
## Next
- Fixed a bug in `<wa-relative-time>` where the title attribute would show with redundant info
- Added more resilient support for lazy loaded options in `<wa-select>`
## 3.0.0-alpha.3

View File

@@ -359,6 +359,7 @@ export default class WaSelect extends WebAwesomeFormAssociatedElement {
// If it is open, update the value based on the current selection and close it
if (this.currentOption && !this.currentOption.disabled) {
this.valueHasChanged = true;
if (this.multiple) {
this.toggleOptionSelection(this.currentOption);
} else {