File tree Expand file tree Collapse file tree 2 files changed +15
-13
lines changed
app/code/Magento/PageBuilder/view/adminhtml/web
ts/js/content-type/buttons Expand file tree Collapse file tree 2 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ import createContentType from "../../content-type-factory";
15
15
import Option from "../../content-type-menu/option" ;
16
16
import OptionInterface from "../../content-type-menu/option.d" ;
17
17
import StageUpdateAfterParamsInterface from "../../stage-update-after-params.d" ;
18
- import ContentTypeDroppedCreateEventParamsInterface from "../content-type-dropped-create-event-params" ;
18
+ import ContentTypeAfterRenderEventParamsInterface from "../content-type-after-render-event-params.d" ;
19
+ import ContentTypeDroppedCreateEventParamsInterface from "../content-type-dropped-create-event-params.d" ;
19
20
import PreviewCollection from "../preview-collection" ;
20
21
21
22
/**
@@ -44,15 +45,16 @@ export default class Preview extends PreviewCollection {
44
45
}
45
46
} ) ;
46
47
47
- events . on ( "buttons:renderAfter" , ( args : ContentTypeDroppedCreateEventParamsInterface ) => {
48
- _ . debounce ( ( ) => {
48
+ events . on ( "buttons:renderAfter" , ( eventData : ContentTypeAfterRenderEventParamsInterface ) => {
49
+ if ( eventData . contentType . id === this . parent . id ) {
49
50
this . resizeChildButtons ( ) ;
50
- } , 500 ) . call ( this ) ;
51
+ }
51
52
} ) ;
52
- events . on ( "button-item:renderAfter" , ( args : ContentTypeDroppedCreateEventParamsInterface ) => {
53
- _ . debounce ( ( ) => {
53
+
54
+ events . on ( "button-item:renderAfter" , ( eventData : ContentTypeAfterRenderEventParamsInterface ) => {
55
+ if ( eventData . contentType . parent . id === this . parent . id ) {
54
56
this . resizeChildButtons ( ) ;
55
- } , 500 ) . call ( this ) ;
57
+ }
56
58
} ) ;
57
59
58
60
events . on ( "stage:updateAfter" , ( eventData : StageUpdateAfterParamsInterface ) => {
You can’t perform that action at this time.
0 commit comments