Giter Club home page Giter Club logo

Comments (12)

dextermb avatar dextermb commented on August 18, 2024 8

Just to confirm, yes this.refs['picker'].togglePicker() worked.

Calling togglePicker outside of the component does not seem to work for me:

this.select.current.togglePicker();

<RNPickerSelect
    ref={this.select}
    onValueChange={fn}
    items={[]}
/>

This seems to work on iOS but not android.

from react-native-picker-select.

mikerodham avatar mikerodham commented on August 18, 2024 2

Just to confirm, yes this.refs['picker'].togglePicker() worked.

from react-native-picker-select.

dextermb avatar dextermb commented on August 18, 2024 2

Just to confirm, yes this.refs['picker'].togglePicker() worked.

Calling togglePicker outside of the component does not seem to work for me:

this.select.current.togglePicker();

<RNPickerSelect
    ref={this.select}
    onValueChange={fn}
    items={[]}
/>

from react-native-picker-select.

kdonovan avatar kdonovan commented on August 18, 2024

It's apparently undocumented, but have you tried togglePicker()?

from react-native-picker-select.

lfkwtz avatar lfkwtz commented on August 18, 2024

@sidraval does togglePicker solve your needs on iOS?

For Android, this issue exists on the feature req board as #22

from react-native-picker-select.

lfkwtz avatar lfkwtz commented on August 18, 2024

@sidraval let me know if that solves it so i can close this out

from react-native-picker-select.

sidraval avatar sidraval commented on August 18, 2024

@lfkwtz My project wrapped up, so I can't test togglePicker() anymore – I'll close this out now

from react-native-picker-select.

lfkwtz avatar lfkwtz commented on August 18, 2024

see link above ^ #22

from react-native-picker-select.

llaine avatar llaine commented on August 18, 2024

Outside of the component calling open works for me

class InputSelect {
  private picker;
  render() {
    return (
      <RNPickerSelect ref={e => this.picker = e} ... />
    )
  }
  open() { this.picker.togglePicker() }
}

from react-native-picker-select.

iman2420 avatar iman2420 commented on August 18, 2024

TypeError: refAlphabetList.current.togglePicker is not a function

from react-native-picker-select.

tara-singh-danu avatar tara-singh-danu commented on August 18, 2024

togglePicker() not working on Android.

from react-native-picker-select.

shoki61 avatar shoki61 commented on August 18, 2024

#424 (comment)
this solution worked

from react-native-picker-select.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.