File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -683,10 +683,7 @@ class BigList extends PureComponent {
683683 } ) ;
684684
685685 const getEmpty = ( ) => {
686- const props = {
687- key : 'empty' ,
688- style : fullItemStyle
689- } ;
686+ const props = { style : fullItemStyle } ;
690687
691688 return ListEmptyComponent
692689 ? createElement ( ListEmptyComponent , props )
@@ -709,6 +706,7 @@ class BigList extends PureComponent {
709706 ) ;
710707 items . splice ( headerIndex + 1 , 0 , {
711708 type : BigListItemType . EMPTY ,
709+ key : 'empty' ,
712710 } ) ;
713711 if ( hideHeaderOnEmpty ) {
714712 // Hide header
@@ -817,7 +815,11 @@ class BigList extends PureComponent {
817815 }
818816 break ;
819817 case BigListItemType . EMPTY :
820- children . push ( getEmpty ( ) ) ;
818+ children . push (
819+ < React . Fragment key = { itemKey } >
820+ { getEmpty ( ) }
821+ </ React . Fragment >
822+ ) ;
821823 break ;
822824 case BigListItemType . SPACER :
823825 children . push (
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ export const mergeViewStyle = (style, defaultStyle = {}) => {
131131export const createElement = ( Component , ...props ) => {
132132 return Component != null ? (
133133 React . isValidElement ( Component ) ? (
134- Component
134+ React . cloneElement ( Component , props )
135135 ) : (
136136 < Component { ...props } />
137137 )
You can’t perform that action at this time.
0 commit comments