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

Commit 66cb43b

Browse files
authored
Merge pull request #326 from ghiscoding/bugfix/editor-options
fix(editor): use editorOptions only
2 parents 2cd1d7f + 49bbeaa commit 66cb43b

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

src/app/examples/grid-angular.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export class GridAngularComponent implements OnInit {
180180
label: 'label',
181181
labelSuffix: 'symbol'
182182
},
183-
elementOptions: {
183+
editorOptions: {
184184
maxHeight: 400
185185
}
186186
},

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export class GridEditorComponent implements OnInit {
239239
value: 0,
240240
operator: OperatorType.notEqual
241241
},
242-
elementOptions: {
242+
editorOptions: {
243243
maxHeight: 400
244244
}
245245
},

src/app/modules/angular-slickgrid/editors/selectEditor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,8 @@ export class SelectEditor implements Editor {
604604
this.$editorElm.addClass('form-control');
605605
} else {
606606
const elementOptions = (this.columnDef.internalColumnEditor) ? this.columnDef.internalColumnEditor.elementOptions : {};
607-
this.editorElmOptions = { ...this.defaultOptions, ...elementOptions };
607+
const editorOptions = (this.columnDef.internalColumnEditor) ? this.columnDef.internalColumnEditor.editorOptions : {};
608+
this.editorElmOptions = { ...this.defaultOptions, ...elementOptions, ...editorOptions };
608609
this.$editorElm = this.$editorElm.multipleSelect(this.editorElmOptions);
609610
setTimeout(() => this.show());
610611
}

src/app/modules/angular-slickgrid/models/columnEditor.interface.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ export interface ColumnEditor {
5151
*/
5252
editorOptions?: MultipleSelectOption | any;
5353

54+
55+
/**
56+
* @deprecated please use "editorOptions" property instead.
57+
* DOM element extra options.
58+
*/
59+
elementOptions?: any;
60+
5461
/**
5562
* Defaults to false, when set it will render any HTML code instead of removing it (sanitized)
5663
* Only used so far in the MultipleSelect & SingleSelect Filters will support it
@@ -99,9 +106,6 @@ export interface ColumnEditor {
99106
/** Step value of the filter, works only with Filters supporting it (input text, number, float, range, slider) */
100107
valueStep?: number | string;
101108

102-
/** DOM element extra options */
103-
elementOptions?: any;
104-
105109
/**
106110
* Use "params" to pass any type of arguments to your Custom Editor
107111
* or regular Editor like the Editors.float

test/cypress/integration/example9.spec.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('Example 9 - Grid Menu', () => {
2525
.children('.slick-header-menubutton')
2626
.should('be.hidden')
2727
.invoke('show')
28-
.click();
28+
.trigger('click', { force: true });
2929

3030
cy.get('.slick-header-menu')
3131
.should('be.visible')
@@ -76,7 +76,7 @@ describe('Example 9 - Grid Menu', () => {
7676
.children('.slick-header-menubutton')
7777
.should('be.hidden')
7878
.invoke('show')
79-
.click();
79+
.trigger('click', { force: true });
8080

8181
cy.get('.slick-header-menu')
8282
.should('be.visible')
@@ -147,7 +147,7 @@ describe('Example 9 - Grid Menu', () => {
147147
.children('.slick-header-menubutton')
148148
.should('be.hidden')
149149
.invoke('show')
150-
.click();
150+
.trigger('click', { force: true });
151151

152152
cy.get('.slick-header-menu')
153153
.should('be.visible')
@@ -192,7 +192,6 @@ describe('Example 9 - Grid Menu', () => {
192192
.children('.slick-header-menubutton')
193193
.should('be.hidden')
194194
.invoke('show')
195-
.click()
196195
.trigger('click', { force: true });
197196

198197
cy.get('.slick-header-menu')

0 commit comments

Comments
 (0)