Skip to content

Commit fac005a

Browse files
committed
fix(intro-screen-native): fix horizontal list item layout
1 parent ad1baba commit fac005a

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

packages/pluggableWidgets/intro-screen-native/src/SwipeableContainer.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,12 @@ export const SwipeableContainer = (props: SwipeableContainerProps): ReactElement
111111
onSlideChange(index, activeIndexBeforeChange);
112112
};
113113

114-
const renderItem = ({ item }: any): ReactElement => {
115-
return <View style={[{ width, flex: 1 }]}>{item.content}</View>;
116-
};
114+
const renderItem = useCallback(
115+
({ item }: any): ReactElement => {
116+
return <View style={[{ width }]}>{item.content}</View>;
117+
},
118+
[width]
119+
);
117120

118121
const renderButton = (
119122
caption: Option<string>,

0 commit comments

Comments
 (0)