Skip to content

Commit b235e69

Browse files
committed
PB-1199 - fix bug PB-1199
1 parent b8ce51c commit b235e69

File tree

3 files changed

+9
-1
lines changed
  • app/code/Magento/PageBuilder/view/adminhtml/web

3 files changed

+9
-1
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/column/preview.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/template/content-type/column-group/default/preview.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<div class="pagebuilder-column-group pagebuilder-content-type-affordance pagebuilder-content-type pagebuilder-affordance-column-group"
99
ko-style="Object.assign(data.container.style, getStyle(data.main, ['marginTop', 'marginBottom', 'marginLeft', 'marginRight', 'width', 'alignSelf', 'minHeight']))"
1010
event="{ mouseover: onMouseOver, mouseout: onMouseOut }, mouseoverBubble: false"
11-
css="Object.assign(data.main.css(), {'empty-container': $parent.children().length == 0})"
11+
css="Object.assign(data.main.css(), {'resizing': resizing, 'empty-child': hasEmptyChild, 'grid-change': gridChange, 'empty-container': $parent.children().length == 0})"
1212
attr="data.main.attributes">
1313

1414
<render args="getOptions().template"></render>

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/content-type/column/preview.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import {
2626
import ObservableUpdater from "../observable-updater";
2727
import PreviewCollection from "../preview-collection";
2828
import {updateColumnWidth} from "./resize";
29+
import {InitElementEventParamsInterface} from "./column-events.types";
2930

3031
/**
3132
* @api
@@ -92,6 +93,9 @@ export default class Preview extends PreviewCollection {
9293
this.resetRemoveOnLastColumn(args.targetParent);
9394
this.resetRemoveOnLastColumn(args.sourceParent);
9495
});
96+
events.on("column:initializeAfter", (args: InitElementEventParamsInterface) => {
97+
this.resetRemoveOnLastColumn(args.columnGroup);
98+
});
9599
events.on("column:dropAfter", (args: ContentTypeDroppedCreateEventParamsInterface) => {
96100
this.resetRemoveOnLastColumn(this.contentType.parentContentType);
97101
});

0 commit comments

Comments
 (0)