Skip to content

Commit 1125159

Browse files
committed
fix(rn): 空字符串时,输入中文异常
1 parent 5d20f91 commit 1125159

File tree

1 file changed

+1
-1
lines changed
  • packages/taro-components-rn/src/components/Input

1 file changed

+1
-1
lines changed

packages/taro-components-rn/src/components/Input/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const _Input = (props: InputProps) => {
121121
if (typeof result === 'string') {
122122
tmpValue.current = result
123123
setReturnValue(result)
124-
} else if (returnValue) {
124+
} else if (returnValue !== undefined) {
125125
// 为了处理输入不合法,setState 相同值时,状态不更新,UI 也得不到更新,重置状态进而更新
126126
setReturnValue(undefined)
127127
}

0 commit comments

Comments
 (0)