Skip to content

Commit

Permalink
fix(rn): 空字符串时,输入中文异常
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqingchen committed Mar 3, 2025
1 parent 5d20f91 commit 1125159
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-components-rn/src/components/Input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const _Input = (props: InputProps) => {
if (typeof result === 'string') {
tmpValue.current = result
setReturnValue(result)
} else if (returnValue) {
} else if (returnValue !== undefined) {
// 为了处理输入不合法,setState 相同值时,状态不更新,UI 也得不到更新,重置状态进而更新
setReturnValue(undefined)
}
Expand Down

0 comments on commit 1125159

Please sign in to comment.