Skip to content

Commit

Permalink
fix(select): fixed text when reselect the item,
Browse files Browse the repository at this point in the history
user DOM manipulation to update it
  • Loading branch information
Demirci committed Apr 5, 2024
1 parent fe1725a commit a06d1cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core/src/components/select/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,9 @@ export class Select {

this.selectedLabels = this.selectedItems.map((item) => item.label);

if (this.isSingleMode) {
this.inputValue = this.selectedLabels?.length
? this.selectedLabels[0]
: null;
if (this.isSingleMode && this.selectedLabels?.length) {
this.inputValue = this.selectedLabels[0];
this.inputRef && (this.inputRef.value = this.inputValue);
return;
}

Expand Down Expand Up @@ -311,6 +310,7 @@ export class Select {
this.isDropdownEmpty = this.isEveryDropdownItemHidden;
} else {
this.navigationItem = undefined;
this.updateSelection();
}
}

Expand Down

0 comments on commit a06d1cb

Please sign in to comment.