MichaelCereda/react-native-form-generator

Multiple drop down(ICON) doesn't work in PickerField

Oladotun opened this issue · 0 comments

In using PickerField:

I try to use two icons to be updated on user click. Like below:

iconRight= {[<Icon style={{alignSelf:'center', marginLeft:10}} name='ios-arrow-forward' size={30} />,
                      <Icon style={{alignSelf:'center', marginLeft:10}} name='ios-arrow-down' size={30} />
                      ]}

On re-rendering the app, Both Icons are displaying in the field.

On further investigation,

In lib/PickerComponent.ios.js, it seems like the iconRight are not updated properly.

I updated line 138 - 141 as below:

{(iconRight)
              ? iconRight
              : null
            }

And I was able to see both icons.