mirror of
https://github.com/shoelace-style/shoelace.git
synced 2026-01-12 11:09:13 +00:00
fix value not clearing with clear / tag removal
This commit is contained in:
@@ -464,6 +464,8 @@ export default class SlSelect extends ShoelaceElement implements ShoelaceFormCon
|
||||
private handleClearClick(event: MouseEvent) {
|
||||
event.stopPropagation();
|
||||
|
||||
this.valueHasChanged = true
|
||||
|
||||
if (this.value !== '') {
|
||||
this.setSelectedOptions([]);
|
||||
this.displayInput.focus({ preventScroll: true });
|
||||
@@ -535,6 +537,8 @@ export default class SlSelect extends ShoelaceElement implements ShoelaceFormCon
|
||||
private handleTagRemove(event: SlRemoveEvent, option: SlOption) {
|
||||
event.stopPropagation();
|
||||
|
||||
this.valueHasChanged = true
|
||||
|
||||
if (!this.disabled) {
|
||||
this.toggleOptionSelection(option, false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user