问题
I'm developing an inventory system for my father's company and on of its requisites is to be able to use an external Barcode/QR Code scanner.
I've developed everything using the camera as well, but I really need to use the scanner whithout showing the keyboard.
Do any of you guys know if it's possible? if not, can it be done in any other way?
回答1:
There is a property called showSoftInputOnFocus
in newer react-native versions. Setting this to false keeps the keyboard hidden.
<TextInput showSoftInputOnFocus={false} autoFocus={true}..../>
Working for me on v0.60.0
来源:https://stackoverflow.com/questions/59639041/react-native-textinput-with-focus-but-without-keyboard-showing