perf(react): assign initialListSize if not undefined

This commit is contained in:
zoomchan-cxj
2022-10-26 12:02:56 +08:00
committed by Zoom Chan
parent 2cb52c021c
commit 0068cced43
@@ -446,7 +446,9 @@ class ListView extends React.Component<ListViewProps, ListViewState> {
if (Device.platform.OS === 'ios') {
nativeProps.numberOfRows = itemList.length;
}
(nativeProps as ListViewProps).initialListSize = initialListSize;
if (typeof initialListSize !== 'undefined') {
(nativeProps as ListViewProps).initialListSize = initialListSize;
}
(nativeProps as ListViewProps).style = {
overflow: 'scroll',
...style,