Skip to content

Commit

Permalink
feat: add validation in select tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Natalie9 committed Oct 9, 2024
1 parent 200e014 commit 859fb93
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 859fb93

Please sign in to comment.