Skip to content

Commit

Permalink
fix(editors): only open ms-select drop when exists (#1525)
Browse files Browse the repository at this point in the history
* fix(editors): only open ms-select drop when exists
- when Row Selection in combo with single click open Editor, it was selecting the row and conflicting with the ms-select open, the issue was caused by a 0ms delay to open the ms-select editor and by the time it was calling open (after delay), the ms-select was in fact destroyed already because of the row selection causing a phantom select in top left corner that wasn't being removed and became an orphan element
  • Loading branch information
ghiscoding committed May 11, 2024
1 parent a6dbf2c commit 247daba
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/vite-demo-vanilla-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"bulma": "^1.0.0",
"dompurify": "^3.1.2",
"fetch-jsonp": "^1.3.0",
"multiple-select-vanilla": "^3.2.0",
"multiple-select-vanilla": "^3.2.1",
"rxjs": "^7.8.1",
"whatwg-fetch": "^3.6.20"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"autocompleter": "^9.2.1",
"dequal": "^2.0.3",
"excel-builder-vanilla": "3.0.1",
"multiple-select-vanilla": "^3.2.0",
"multiple-select-vanilla": "^3.2.1",
"sortablejs": "^1.15.2",
"un-flatten-tree": "^2.0.12",
"vanilla-calendar-picker": "^2.11.5"
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions test/cypress/e2e/example15.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,17 @@ describe('Example 15 - OData Grid using RxJS', () => {
cy.get('[data-test="add-gender-btn"]').should('be.disabled');
});

it('should select 1st row', () => {
cy.get(`[style="top: ${GRID_ROW_HEIGHT * 0}px;"] > .slick-cell:nth(0)`)
.click();

cy.get('.grid15')
.find('.slick-row')
.children()
.filter('.slick-cell-checkboxsel.selected')
.should('have.length', 1);
});

it('should open the "Gender" editor on the first row and expect to find 1 more option the editor list (male, female, other)', () => {
const expectedOptions = ['male', 'female', 'other'];

Expand Down

0 comments on commit 247daba

Please sign in to comment.