Skip to content

Commit

Permalink
refactor(components/select): restructured Select element
Browse files Browse the repository at this point in the history
  • Loading branch information
hirotomoyamada committed Nov 26, 2023
1 parent 965abe7 commit a1ee1bd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-coats-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@yamada-ui/select": patch
---

Restructured `Select` inner element.
24 changes: 12 additions & 12 deletions packages/components/select/src/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,21 +169,21 @@ export const Select = forwardRef<SelectProps, "div">((props, ref) => {
__css={{ position: "relative", ...styles.inner }}
>
<PopoverTrigger>
<SelectField h={h} minH={minH} {...getFieldProps({}, ref)}>
<SelectIcon {...iconProps} {...formControlProps} />
</SelectField>
<SelectField h={h} minH={minH} {...getFieldProps({}, ref)} />
</PopoverTrigger>

{!isEmpty ? (
<SelectList {...listProps}>
{!!placeholder && placeholderInOptions ? (
<Option>{placeholder}</Option>
) : null}

{children ?? computedChildren}
</SelectList>
) : null}
<SelectIcon {...iconProps} {...formControlProps} />
</ui.div>

{!isEmpty ? (
<SelectList {...listProps}>
{!!placeholder && placeholderInOptions ? (
<Option>{placeholder}</Option>
) : null}

{children ?? computedChildren}
</SelectList>
) : null}
</ui.div>
</Popover>
</SelectProvider>
Expand Down

0 comments on commit a1ee1bd

Please sign in to comment.