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

modalwidget with selectwidget

Open entrapnet opened this issue 7 years ago • 1 comments

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

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

        >
         <GiftedForm.SeparatorWidget />
          <GiftedForm.SelectWidget name='wallet' title='Wallet' multiple={false}>
          {
            this.state.WalletList.map((u, i) => {
              return (
                 <GiftedForm.OptionWidget 
                  key={u.wallet_code}
                  title={u.wallet_code} value={u.wallet_code}/> 
                
                );
              })
          }

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.

entrapnet avatar Aug 10 '17 03:08 entrapnet

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}/> 
));
...

sambwest avatar Jun 01 '18 21:06 sambwest