Skip to content

Commit

Permalink
Merge pull request #2419 from gluestack/release/select
Browse files Browse the repository at this point in the history
Release/select
  • Loading branch information
rajat693 authored Aug 28, 2024
2 parents 73869e7 + 6f212ce commit 2e2b8d6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-dingos-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@gluestack-ui/select': patch
---

fix: default value in Select
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 2e2b8d6

Please sign in to comment.