react-native-gifted-form icon indicating copy to clipboard operation
react-native-gifted-form copied to clipboard

How to pass dynamic Data in option values in selectwidget

Open gauravverma029 opened this issue 6 years ago • 3 comments

Please Check this Link

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

gauravverma029 avatar Mar 03 '18 08:03 gauravverma029

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>

sambwest avatar Jun 01 '18 20:06 sambwest

How to pass dynamic Data in option values in selectwidget

ashishmv7 avatar Aug 21 '19 04:08 ashishmv7

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!

kimngoc0347 avatar Mar 27 '20 08:03 kimngoc0347