Skip to content

Commit

Permalink
fix(editor): use editorOptions only
Browse files Browse the repository at this point in the history
- deprecate elementOptions and use editorOptions
  • Loading branch information
ghiscoding-SE committed Oct 24, 2019
1 parent a3ceb7f commit 08b1930
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/examples/grid-angular.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export class GridAngularComponent implements OnInit {
label: 'label',
labelSuffix: 'symbol'
},
elementOptions: {
editorOptions: {
maxHeight: 400
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/app/examples/grid-editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ export class GridEditorComponent implements OnInit {
value: 0,
operator: OperatorType.notEqual
},
elementOptions: {
editorOptions: {
maxHeight: 400
}
},
Expand Down
3 changes: 2 additions & 1 deletion src/app/modules/angular-slickgrid/editors/selectEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,8 @@ export class SelectEditor implements Editor {
this.$editorElm.addClass('form-control');
} else {
const elementOptions = (this.columnDef.internalColumnEditor) ? this.columnDef.internalColumnEditor.elementOptions : {};
this.editorElmOptions = { ...this.defaultOptions, ...elementOptions };
const editorOptions = (this.columnDef.internalColumnEditor) ? this.columnDef.internalColumnEditor.editorOptions : {};
this.editorElmOptions = { ...this.defaultOptions, ...elementOptions, ...editorOptions };
this.$editorElm = this.$editorElm.multipleSelect(this.editorElmOptions);
setTimeout(() => this.show());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ export interface ColumnEditor {
*/
editorOptions?: MultipleSelectOption | any;


/**
* @deprecated please use "editorOptions" property instead.
* DOM element extra options.
*/
elementOptions?: any;

/**
* Defaults to false, when set it will render any HTML code instead of removing it (sanitized)
* Only used so far in the MultipleSelect & SingleSelect Filters will support it
Expand Down Expand Up @@ -99,9 +106,6 @@ export interface ColumnEditor {
/** Step value of the filter, works only with Filters supporting it (input text, number, float, range, slider) */
valueStep?: number | string;

/** DOM element extra options */
elementOptions?: any;

/**
* Use "params" to pass any type of arguments to your Custom Editor
* or regular Editor like the Editors.float
Expand Down

0 comments on commit 08b1930

Please sign in to comment.