Skip to content

Commit

Permalink
fix: fix the problem that children of text input would be cleared whe…
Browse files Browse the repository at this point in the history
…n setting the selection prop
  • Loading branch information
ZhuoYitao committed Dec 29, 2023
1 parent b5e08e8 commit b5b278f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,8 @@ function InternalTextInput(props: Props): React.Node {
? props.value
: typeof props.defaultValue === 'string'
? props.defaultValue
: typeof props.value === 'undefined'
? null
: '';

// This is necessary in case native updates the text and JS decides
Expand Down

0 comments on commit b5b278f

Please sign in to comment.