Skip to content

Commit a28a62d

Browse files
committed
fix: Composite Editor should work with Cell Menu
1 parent 3b549c2 commit a28a62d

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

src/app/examples/grid-composite-editor.component.ts

+3
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,9 @@ export class GridCompositeEditorComponent implements OnDestroy, OnInit {
447447
},
448448
// when using the cellMenu, you can change some of the default options and all use some of the callback methods
449449
enableCellMenu: true,
450+
cellMenu: {
451+
preventEventBubbling: false
452+
},
450453
gridMenu: {
451454
hideToggleDarkModeCommand: false, // hidden by default
452455
onCommand: (_, args) => {

test/cypress/e2e/example30.cy.ts

+29
Original file line numberDiff line numberDiff line change
@@ -612,4 +612,33 @@ describe('Example 30 Composite Editor Modal', () => {
612612

613613
cy.get(`[style="top: ${GRID_ROW_HEIGHT * 1}px;"] > .slick-cell:nth(10)`).should('contain', '');
614614
});
615+
616+
it('should open Edit Composite Editor from Cell Menu and expect Task 3 on 6th row', () => {
617+
cy.get(`[style="top: ${GRID_ROW_HEIGHT * 6}px;"] > .slick-cell:nth(11)`).click();
618+
619+
cy.get('.slick-menu-item .slick-menu-content')
620+
.first()
621+
.should('contain', 'Edit Row')
622+
.click();
623+
624+
cy.get('.slick-editor-modal-title')
625+
.should('contain', 'Editing - Task 3');
626+
627+
cy.get('.slick-editor-modal-footer .btn-cancel')
628+
.click();
629+
});
630+
631+
it('should open Clone Composite Editor from Cell Menu and expect Task 3 on 6th row', () => {
632+
cy.get(`[style="top: ${GRID_ROW_HEIGHT * 6}px;"] > .slick-cell:nth(11)`).click();
633+
634+
cy.get('.slick-menu-item .slick-menu-content:nth(1)')
635+
.should('contain', 'Clone Row')
636+
.click();
637+
638+
cy.get('.slick-editor-modal-title')
639+
.should('contain', 'Clone - Task 3');
640+
641+
cy.get('.slick-editor-modal-footer .btn-cancel')
642+
.click();
643+
});
615644
});

0 commit comments

Comments
 (0)