Skip to content

Commit

Permalink
[RNMobile] Replace fragment with View to pass the key (#27326)
Browse files Browse the repository at this point in the history
* Replace fragment with view to pass the key

* Change the key passed to picker item

* Remove index from the key
  • Loading branch information
lukewalczak authored Nov 30, 2020
1 parent 2239c5d commit c57bd8c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/components/src/mobile/picker/index.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,13 @@ export default class Picker extends Component {
hideHeader
>
<PanelBody title={ title } style={ styles.panelBody }>
{ options.map( ( option, index ) => (
<>
{ options.map( ( option ) => (
<View key={ `${ option.label }-${ option.value }` }>
{ options.length > 1 && option.separated && (
<Separator />
) }
<BottomSheet.Cell
icon={ option.icon }
key={ index }
leftAlign={ leftAlign }
label={ option.label }
separatorType={ 'none' }
Expand All @@ -81,7 +80,7 @@ export default class Picker extends Component {
disabled={ option.disabled }
style={ option.disabled && styles.disabled }
/>
</>
</View>
) ) }
{ ! hideCancelButton && (
<BottomSheet.Cell
Expand Down

0 comments on commit c57bd8c

Please sign in to comment.