FaridSafi / react-native-gifted-form

📝 « One React-Native form component to rule them all »
MIT License
1.44k stars 214 forks source link

modalwidget with selectwidget #107

Open entrapnet opened 7 years ago

entrapnet commented 7 years ago

I'm trying to work on modalwidget with selectwidget. My code look like below

<GiftedForm.ModalWidget title='Wallet' displayValue='wallet'

{ this.state.WalletList.map((u, i) => { return (
                );
              })
          }

As you can see that I try to map my optionwidget when the state change. It work flawlessly without modal but with the modalwidget, it load my original value.

Hope somebody can help me out here.

sambwest commented 6 years ago

Why are you returning a from a function after map? Should be...

...
this.state.WalletList.map((u, i) => (
  <GiftedForm.OptionWidget key={u.wallet_code} title={u.wallet_code} value={u.wallet_code}/> 
));
...