Skip to content

Commit

Permalink
fix: TextInput can't write 中文 in Modal(#1230)
Browse files Browse the repository at this point in the history
  • Loading branch information
1uokun committed Aug 22, 2022
1 parent c2c5905 commit 7623c36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/modal/PromptContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export default class PropmptContainer extends React.Component<
onChangeText={(value) => {
this.onChangeText('text', value)
}}
value={this.state.text}
defaultValue={this.state.text}
style={styles.input}
underlineColorAndroid="transparent"
placeholder={placeholders![0]}
Expand All @@ -173,7 +173,7 @@ export default class PropmptContainer extends React.Component<
onChangeText={(value) => {
this.onChangeText('password', value)
}}
value={this.state.password}
defaultValue={this.state.password}
style={styles.input}
underlineColorAndroid="transparent"
placeholder={placeholders![1]}
Expand Down

1 comment on commit 7623c36

@1uokun
Copy link
Collaborator Author

@1uokun 1uokun commented on 7623c36 Aug 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

facebook/react-native#18403

we fixed it : replace value to defaultValue

Please sign in to comment.