Skip to content

Commit

Permalink
chore: different approach for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSisb committed Oct 16, 2023
1 parent f64a876 commit ad75602
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions packages/paste-core/components/select/src/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,24 @@ const Select = React.forwardRef<HTMLSelectElement, SelectProps>(
variant={variant}
>
<Box display="flex" width="100%" position="relative">
<SelectElement
aria-invalid={hasError}
data-not-selectize="true"
disabled={disabled}
ref={ref}
element={`${element}_ELEMENT`}
{...props}
multiple={multiple}
size={multiple ? size : 0}
variant={variant}
key={showOptions ? "show" : "hide"}
>
{showOptions && children}
</SelectElement>
{showOptions ? (
<SelectElement
aria-invalid={hasError}
data-not-selectize="true"
disabled={disabled}
ref={ref}
element={`${element}_ELEMENT`}
{...props}
multiple={multiple}
size={multiple ? size : 0}
variant={variant}
key="mounted"
>
{children}
</SelectElement>
) : (
<SelectElement key="unmounted">{}</SelectElement>
)}
{!multiple && (
<InputChevronWrapper element={`${element}_CHEVRON_WRAPPER`}>
<ChevronDownIcon
Expand Down

0 comments on commit ad75602

Please sign in to comment.