react-native-picker-select icon indicating copy to clipboard operation
react-native-picker-select copied to clipboard

togglePicker() not working on android

Open tiennguyen9988 opened this issue 3 years ago • 4 comments

Describe the bug
I need trigger open Picker from button. I used togglePicker and it's nice on ios but not working on android. Please help me any solution ?

Additional details

  • Device: [SamSung]
  • OS: [Android]
  • react-native-picker-select version: [8.0.3]
  • react-native version: [0.63.4]

tiennguyen9988 avatar Sep 06 '21 00:09 tiennguyen9988

I solved this problem with the solution:

  • fork react-native-picker-select package
  • update "@react-native-picker/picker": "^1.16.7",
  • add action focus() inside togglePicker function for platform Android Link: https://github.com/tiennguyen9988/react-native-picker-select I hope the publisher updates this issue for the next release soon.

tiennguyen9988 avatar Sep 06 '21 01:09 tiennguyen9988

@amos80m thank u, its worked.

NazimMertBilgi avatar Dec 23 '21 14:12 NazimMertBilgi

I've created a patch for those who use patch-package but don't want to fork the repo:

(this is just the index.js from @tiennguyen9988 's forked version) https://gist.github.com/Moistbobo/2b4bbc5a4a4a0b4c405b44024b5b8c82

Moistbobo avatar Jan 11 '22 04:01 Moistbobo