Skip to content

Commit

Permalink
trim text value in <mdui-select> #330
Browse files Browse the repository at this point in the history
  • Loading branch information
zdhxiong committed Jul 15, 2024
1 parent 1854543 commit ae4cce7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/mdui/src/components/select/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,9 @@ export class Select
}

return (
this.menuItems.find((item) => item.value === valueItem)?.textContent ||
valueItem
this.menuItems
.find((item) => item.value === valueItem)
?.textContent?.trim() || valueItem
);
}

Expand Down

0 comments on commit ae4cce7

Please sign in to comment.