Skip to content

Commit

Permalink
fix(select): reset display value when its value changes (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
daenub authored Feb 26, 2025
1 parent 3786a59 commit 158ed5f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/select/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ export class LeuSelect extends LeuElement {
const menuItems = menu.getMenuItems()
let hasFilterResults = false

if (changed.value && this.value.length === 0) {
this._displayValue = ""
}

/* eslint-disable no-param-reassign */
menuItems.forEach((menuItem) => {
if (changed.multiple) {
Expand Down

0 comments on commit 158ed5f

Please sign in to comment.