Skip to content

Commit

Permalink
feat(select): add validation in select tag (#590)
Browse files Browse the repository at this point in the history
  • Loading branch information
Natalie9 authored Oct 21, 2024
1 parent dbc7e64 commit 647eba6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/core/src/components/select/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,14 @@ export class AtomSelect {
const optionElement =
this.getElementByTag(itemElement, 'ion-radio') ||
this.getElementByTag(itemElement, 'ion-checkbox')

if (!optionElement?.shadowRoot) return

const optionShadowRoot = optionElement.shadowRoot
.firstElementChild as HTMLElement

if (!optionShadowRoot) return

const firstElementInOption =
optionShadowRoot.firstElementChild as HTMLElement

Expand Down

0 comments on commit 647eba6

Please sign in to comment.