Skip to content

Commit f967a82

Browse files
committed
Allow omitting ListEmptyComponent
1 parent cc8a391 commit f967a82

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export type Props<Row> = ScrollView['props'] & {
9292
maxToRenderPerBatch?: number;
9393
windowSize?: number;
9494
updateCellsBatchingPeriod?: number;
95-
ListEmptyComponent?: any;
95+
ListEmptyComponent?: () => JSX.Element;
9696
};
9797

9898
const defaultKeyExtractor = (data: any) => data.key;
@@ -306,14 +306,14 @@ const Component = <Row,>(props: Props<Row>, ref: any, NativeComponent: any) => {
306306
>
307307
{sections.length > 0 ? (
308308
childrenBatched
309-
) : (
309+
) : ListEmptyComponent != null ? (
310310
<View
311311
nativeID="TableViewListEmptyComponent"
312312
style={styles.listEmptyContainer}
313313
>
314314
<ListEmptyComponent />
315315
</View>
316-
)}
316+
) : null}
317317
</NativeComponent>
318318
);
319319
};

0 commit comments

Comments
 (0)