Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pass dynamic Data in option values in selectwidget #126

Open
gauravverma029 opened this issue Mar 3, 2018 · 3 comments
Open

How to pass dynamic Data in option values in selectwidget #126

gauravverma029 opened this issue Mar 3, 2018 · 3 comments

Comments

@gauravverma029
Copy link

Please Check this Link

https://stackoverflow.com/questions/49082122/react-native-gifted-form-how-to-pass-dynamic-option-values-in-selectwidget

@sambwest
Copy link
Contributor

sambwest commented Jun 1, 2018

I think what you want is:

this.state = {
   optionValue :[
         {value:'3',title:'A'},
         {value:'4',title:'B'},
   ]
 }
<GiftedForm.SelectWidget
  name='staff'
  multiple={true}
>
{this.state.optionValue.map(obj => (
  <GiftedForm.OptionWidget
    key={[your random key method]}
    title={obj.title}
    value={obj.value}
  />
))}
</GiftedForm.SelectWidget>

@ashishmv7
Copy link

How to pass dynamic Data in option values in selectwidget

@kimngoc0347
Copy link

you cannot pass dynamic data to selectWidget, it only support hardcode data. you should use the other package before you have to regret like me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants