RN Keyboard dismiss

公司用的RN锁定0.30,很多新功能或者老bug只能手动修复,蛋疼。

现象

当点击TextInput键盘弹起时,如果此时后端报错,input不失焦,键盘也不隐藏,emmmmm

解法

TextInput

1
blurOnSubmit

or

1
TextInput.State.blurTextInput(TextInput.State.currentlyFocusedField())

Keyboard

手动调用 keyboard.dismiss()

other

ref

© 2019 lvbin's Blog All Rights Reserved.
Theme by hiero