File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -201,9 +201,11 @@ export class ComplexListFieldComponent extends AbstractListFieldComponent implem
201
201
const { viewTemplateConfig } = this . schema ;
202
202
return this . values
203
203
. map ( ( value , index ) => {
204
- const editFormDisplayedByUser = this . paginatableItems ? this . paginatableItems . get ( index ) . editFormDisplayedByUser : null ;
204
+ const paginatableItem = this . paginatableItems ? this . paginatableItems . get ( index ) : null ;
205
+ const isNewItem = paginatableItem == null ;
206
+ const editFormDisplayedByUser = isNewItem ? null : paginatableItem . editFormDisplayedByUser ;
205
207
const shouldDisplayEditForm = viewTemplateConfig ? viewTemplateConfig . showEditForm ( value ) : true ;
206
- return { index, shouldDisplayEditForm, editFormDisplayedByUser} ;
208
+ return { index, shouldDisplayEditForm, editFormDisplayedByUser } ;
207
209
} ) . filter ( item => {
208
210
if ( this . shouldDisplayOnlyEditFormItems ) {
209
211
return item . shouldDisplayEditForm ;
You can’t perform that action at this time.
0 commit comments