@@ -95,7 +95,7 @@ export default class Preview extends PreviewCollection {
95
95
this . resetRemoveOnLastColumn ( args . sourceParent ) ;
96
96
} ) ;
97
97
events . on ( "column:initializeAfter" , ( args : InitElementEventParamsInterface ) => {
98
- this . resetRemoveOnLastColumn ( args . columnGroup ) ;
98
+ this . resetRemoveOnLastColumn ( args . columnLine ) ;
99
99
} ) ;
100
100
events . on ( "column:dropAfter" , ( args : ContentTypeDroppedCreateEventParamsInterface ) => {
101
101
this . resetRemoveOnLastColumn ( this . contentType . parentContentType ) ;
@@ -308,19 +308,25 @@ export default class Preview extends PreviewCollection {
308
308
return ;
309
309
}
310
310
const siblings = parentContentType . children ( ) ;
311
- if ( siblings . length < 1 ) {
311
+ const siblingColumnLines = parentContentType . parentContentType . children ( ) ;
312
+ if ( siblings . length < 1 ) {
312
313
return ;
313
314
}
314
- if ( siblings . length === 1 ) {
315
+ if ( siblings . length === 1 && siblingColumnLines . length === 1 ) {
315
316
const lastColumn = siblings [ 0 ] ;
316
317
const options = lastColumn . preview . getOptions ( ) ;
317
318
options . getOption ( "remove" ) . isDisabled ( true ) ;
318
319
return ;
319
320
}
320
- siblings . forEach ( ( column ) => {
321
- const removeOption = column . preview . getOptions ( ) . getOption ( "remove" ) ;
322
- removeOption . isDisabled ( false ) ;
323
- } ) ;
321
+ debugger ;
322
+ siblingColumnLines . forEach ( ( columnLine ) => {
323
+ let columns = columnLine . children ( ) ;
324
+ columns . forEach ( ( column : ContentTypeCollectionInterface ) => {
325
+ const removeOption = column . preview . getOptions ( ) . getOption ( "remove" ) ;
326
+ removeOption . isDisabled ( false ) ;
327
+ } ) ;
328
+ } )
329
+
324
330
}
325
331
326
332
/**
0 commit comments