Skip to content

Commit 1ceaf7f

Browse files
committed
fix: message list sub components props
1 parent 3e4f797 commit 1ceaf7f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

package/src/components/MessageList/MessageList.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,10 +1143,6 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
11431143
}
11441144
}
11451145

1146-
const ListFooterComponent = useCallback(() => <FooterComponent />, [FooterComponent]);
1147-
1148-
const ListHeaderComponent = useCallback(() => <HeaderComponent />, [HeaderComponent]);
1149-
11501146
const ItemSeparatorComponent = additionalFlatListProps?.ItemSeparatorComponent;
11511147
const WrappedItemSeparatorComponent = useCallback(() => {
11521148
return ItemSeparatorComponent ? <ItemSeparatorComponent /> : null;
@@ -1213,8 +1209,8 @@ const MessageListWithContext = (props: MessageListPropsWithContext) => {
12131209
ItemSeparatorComponent={WrappedItemSeparatorComponent}
12141210
keyboardShouldPersistTaps='handled'
12151211
keyExtractor={keyExtractor}
1216-
ListFooterComponent={ListFooterComponent}
1217-
ListHeaderComponent={ListHeaderComponent}
1212+
ListFooterComponent={FooterComponent}
1213+
ListHeaderComponent={HeaderComponent}
12181214
/**
12191215
If autoscrollToTopThreshold is 10, we scroll to recent only if before the update, the list was already at the
12201216
bottom (10 offset or below).

0 commit comments

Comments
 (0)