Skip to content

Commit 8b2bac5

Browse files
committed
GridView - fix after gridListIItem change (#3001)
1 parent 6d68599 commit 8b2bac5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

demo/src/screens/componentScreens/GridViewScreen.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class GridViewScreen extends Component {
1212
_.map(contacts, contact => ({
1313
imageProps: {source: {uri: contact.thumbnail}, borderRadius: 999, style: {backgroundColor: Colors.grey60}},
1414
title: _.split(contact.name, ' ')[0],
15+
titleLines: 1,
1516
onPress: () => Alert.alert('My name is ' + contact.name)
1617
})))(conversations),
1718
products: _.flow(products => _.take(products, 8),

src/components/gridListItem/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,12 @@ class GridListItem extends Component<GridListItemProps> {
213213
accessible={renderCustomItem ? true : undefined}
214214
{...Modifiers.extractAccessibilityProps(this.props)}
215215
>
216-
{imageProps && <Image style={itemSize} {...imageProps} customOverlayContent={children}/>}
216+
{imageProps && (
217+
<View style={[{borderRadius: imageProps?.borderRadius}, itemSize]}>
218+
<Image {...imageProps} style={[itemSize, imageProps?.style]}/>
219+
{children}
220+
</View>
221+
)}
217222
{!_.isNil(renderCustomItem) && <View style={{width}}>{renderCustomItem()}</View>}
218223
{renderOverlay && <View style={[styles.overlay, itemSize]}>{renderOverlay()}</View>}
219224
<TextContainer {...textContainerStyle}>

0 commit comments

Comments
 (0)