Skip to content

Commit

Permalink
Merge pull request #2417 from gluestack/fix/select-default-option
Browse files Browse the repository at this point in the history
fix: select default option
  • Loading branch information
surajahmed authored Aug 27, 2024
2 parents d96687c + 153cca0 commit b7587d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/unstyled/select/src/SelectPortal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const SelectPortal = (StyledSelectPortal: any) =>
hoverProps,
focusProps,
setValue,
value: value === null ? PLACEHOLDER_OPTION : value,
value: !value ? PLACEHOLDER_OPTION : value,
setLabel,
label,
isReadOnly,
Expand Down Expand Up @@ -78,7 +78,7 @@ export const SelectPortal = (StyledSelectPortal: any) =>
}
}}
ref={mergeRefs([ref, hoverRef])}
value={value ?? PLACEHOLDER_OPTION}
value={!value ? PLACEHOLDER_OPTION : value}
aria-label={placeholder}
aria-readonly={isReadOnly}
style={StyleSheet.flatten([
Expand Down

0 comments on commit b7587d6

Please sign in to comment.