From 152bc8073f676544c0dbd133b51b4196b55b3665 Mon Sep 17 00:00:00 2001 From: Ghislain B Date: Thu, 23 Feb 2023 19:56:42 -0500 Subject: [PATCH] fix: regression Edit cell mouseout should save & excel copy should work (#57) - fixes a bug identified in Angular-Slickgrid [issue](https://github.com/ghiscoding/Angular-Slickgrid/issues/1103) caused by a regression introduced in Slickgrid-Universal PR [901](https://github.com/ghiscoding/slickgrid-universal/pull/901) - requires Slickgrid-Universal PR [917](https://github.com/ghiscoding/slickgrid-universal/pull/917) to be merged and released - the regression came after I wanted to fix another bug which was that making a cell range and Copy+Paste wasn't working, when fixing that bug it caused a new bug (this regression). This PR should fix both of these bugs and remove a very old hack that was introduced with `suppressActiveCellChangeOnEdit` which is no longer required - added Cypress E2E tests to cover the bug identified in Angular-Slickgrid --- package.json | 24 +-- src/examples/slickgrid/Example3.tsx | 172 +++++++++++---------- src/slickgrid-react/global-grid-options.ts | 2 +- test/cypress/e2e/example03.cy.ts | 20 +++ yarn.lock | 150 +++++++++--------- 5 files changed, 195 insertions(+), 173 deletions(-) diff --git a/package.json b/package.json index 75454dc7..816e9a2b 100644 --- a/package.json +++ b/package.json @@ -76,11 +76,11 @@ ] }, "dependencies": { - "@slickgrid-universal/common": "~2.5.0", - "@slickgrid-universal/custom-footer-component": "~2.5.0", - "@slickgrid-universal/empty-warning-component": "~2.5.0", - "@slickgrid-universal/event-pub-sub": "~2.5.0", - "@slickgrid-universal/pagination-component": "~2.5.0", + "@slickgrid-universal/common": "~2.6.0", + "@slickgrid-universal/custom-footer-component": "~2.6.0", + "@slickgrid-universal/empty-warning-component": "~2.6.0", + "@slickgrid-universal/event-pub-sub": "~2.6.0", + "@slickgrid-universal/pagination-component": "~2.6.0", "dequal": "^2.0.3", "dompurify": "^3.0.0", "font-awesome": "^4.7.0", @@ -99,13 +99,13 @@ "@fnando/sparkline": "^0.3.10", "@popperjs/core": "^2.11.6", "@release-it/conventional-changelog": "^5.1.1", - "@slickgrid-universal/composite-editor-component": "~2.5.0", - "@slickgrid-universal/custom-tooltip-plugin": "~2.5.0", - "@slickgrid-universal/excel-export": "~2.5.0", - "@slickgrid-universal/graphql": "~2.5.0", - "@slickgrid-universal/odata": "~2.5.0", - "@slickgrid-universal/rxjs-observable": "~2.5.0", - "@slickgrid-universal/text-export": "~2.5.0", + "@slickgrid-universal/composite-editor-component": "~2.6.0", + "@slickgrid-universal/custom-tooltip-plugin": "~2.6.0", + "@slickgrid-universal/excel-export": "~2.6.0", + "@slickgrid-universal/graphql": "~2.6.0", + "@slickgrid-universal/odata": "~2.6.0", + "@slickgrid-universal/rxjs-observable": "~2.6.0", + "@slickgrid-universal/text-export": "~2.6.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.3", diff --git a/src/examples/slickgrid/Example3.tsx b/src/examples/slickgrid/Example3.tsx index 4c950c6e..6a1f99ea 100644 --- a/src/examples/slickgrid/Example3.tsx +++ b/src/examples/slickgrid/Example3.tsx @@ -332,7 +332,7 @@ export default class Example3 extends React.Component { fetch: (searchText: string, updateCallback: (items: false | any[]) => void) => { /** with FETCH, note this demo won't work because of CORS */ // this.httpFetch.fetch(`http://gd.geobytes.com/AutoCompleteCity?q=${searchText}`) - // .then(response => response.json()) + // .then(response => updateCallback()) // .then(data => response(data)) // .catch(error => console.log('fetch error:', error)); @@ -806,97 +806,99 @@ export default class Example3 extends React.Component {
-
- - - - - -
- - -