Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit b25d56d

Browse files
committed
fix(composite): calling Edit change shouldn't affect Mass-Update
- fix an issue in Slickgrid-Universal which we found that if we Edit a value (let say Title to "Task 1234") and then do a Mass Update on different field (say "% Complete" to 90%), the mass update was actually picking up the "Task 1234" from the previous edit even though it wasn't part of the Mass Update. So we can simply clear the `formValues` object when opening the modal window and before populating the form
1 parent 24674a6 commit b25d56d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/cypress/integration/example30.spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ describe('Example 30 Composite Editor Modal', { retries: 1 }, () => {
262262
cy.get(`[style="top:${GRID_ROW_HEIGHT * 0}px"] > .slick-cell:nth(7)`).find('.fa.fa-check.checkmark-icon').should('have.length', 1);
263263
cy.get(`[style="top:${GRID_ROW_HEIGHT * 0}px"] > .slick-cell:nth(8)`).should('not.be.empty');
264264
cy.get(`[style="top:${GRID_ROW_HEIGHT * 0}px"] > .slick-cell:nth(9)`).should('contain', 'Tasty Granite Table');
265+
266+
// next few rows Title should be unchanged
267+
cy.get(`[style="top:${GRID_ROW_HEIGHT * 1}px"] > .slick-cell:nth(1)`).should('contain', 'TASK 0');
268+
cy.get(`[style="top:${GRID_ROW_HEIGHT * 2}px"] > .slick-cell:nth(1)`).should('contain', 'TASK 1111');
265269
});
266270

267271
it('should open the Composite Editor (Edit Item) and expect all form inputs to be filled with TASK 8888 data of previous create item', () => {
@@ -292,6 +296,10 @@ describe('Example 30 Composite Editor Modal', { retries: 1 }, () => {
292296
cy.get(`[style="top:${GRID_ROW_HEIGHT * 0}px"] > .slick-cell:nth(7)`).find('.fa.fa-check.checkmark-icon').should('not.exist');
293297
cy.get(`[style="top:${GRID_ROW_HEIGHT * 0}px"] > .slick-cell:nth(8)`).should('be.empty');
294298
cy.get(`[style="top:${GRID_ROW_HEIGHT * 0}px"] > .slick-cell:nth(9)`).should('contain', 'Tasty Granite Table');
299+
300+
// next few rows Title should be unchanged
301+
cy.get(`[style="top:${GRID_ROW_HEIGHT * 1}px"] > .slick-cell:nth(1)`).should('contain', 'TASK 0');
302+
cy.get(`[style="top:${GRID_ROW_HEIGHT * 2}px"] > .slick-cell:nth(1)`).should('contain', 'TASK 1111');
295303
});
296304

297305
it('should open the Composite Editor (Mass Update) and be able to change some of the inputs in the form', () => {

0 commit comments

Comments
 (0)