From 3c3b979b51feb96b3435eff35f116cb6b018fdf4 Mon Sep 17 00:00:00 2001 From: fjost Date: Tue, 19 Oct 2021 10:30:00 +0200 Subject: [PATCH 1/2] feat: increment version react-native-picker/picker --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ddf97b89..f2f9367e 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "/src" ], "dependencies": { - "@react-native-picker/picker": "^1.8.3", + "@react-native-picker/picker": "^1.16.7", "lodash.isequal": "^4.5.0" }, "devDependencies": { From c77669968ad89f5af2e3738fdc055bdf1517b672 Mon Sep 17 00:00:00 2001 From: fjost Date: Tue, 19 Oct 2021 10:34:56 +0200 Subject: [PATCH 2/2] feat: add focus function for android --- src/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/index.js b/src/index.js index bcbc93e8..7794585f 100644 --- a/src/index.js +++ b/src/index.js @@ -239,6 +239,10 @@ export default class RNPickerSelect extends PureComponent { Keyboard.dismiss(); } + if (this.pickerRef && Platform.OS == 'android') { + this.pickerRef.focus(); + }; + const animationType = modalProps && modalProps.animationType ? modalProps.animationType : 'slide'; @@ -489,6 +493,7 @@ export default class RNPickerSelect extends PureComponent { {this.renderTextInputOrChildren()} {this.pickerRef = ref}} style={[ Icon ? { backgroundColor: 'transparent' } : {}, // to hide native icon defaultStyles.headlessAndroidPicker, @@ -514,6 +519,7 @@ export default class RNPickerSelect extends PureComponent { return ( {this.pickerRef = ref}} style={[ Icon ? { backgroundColor: 'transparent' } : {}, // to hide native icon style.inputAndroid,