Skip to content

Commit

Permalink
fix(editors): autocomplete editor spinner aligned right in mass update (
Browse files Browse the repository at this point in the history
#162)

* fix(editors): autocomplete editor spinner aligned right in mass update
  • Loading branch information
ghiscoding authored Nov 17, 2020
1 parent 831580d commit 6ae5189
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export class Example2 {
this.eventService.addElementEventListener(gridContainerElm, 'onbeforeexporttoexcel', () => console.log('onBeforeExportToExcel'));
this.eventService.addElementEventListener(gridContainerElm, 'onafterexporttoexcel', () => console.log('onAfterExportToExcel'));
this.sgb = new Slicker.GridBundle(gridContainerElm, this.columnDefinitions, { ...ExampleGridOptions, ...this.gridOptions }, this.dataset);

// you could group by duration on page load (must be AFTER the DataView is created, so after GridBundle)
// this.groupByDuration();
}

dispose() {
Expand Down
12 changes: 10 additions & 2 deletions packages/common/src/editors/autoCompleteEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,16 @@ export class AutoCompleteEditor implements Editor {
}
});

// add a <span> in order to add spinner styling
$(`<span></span>`).appendTo(this.args.container);
// append the new DOM element to the slick cell container,
// we need the autocomplete-container so that the spinner is aligned properly with the Composite Editor
if (this._$editorElm && typeof this._$editorElm.appendTo === 'function') {
const $container = $(`<div class="autocomplete-container"></div>`);
$container.appendTo(this.args.container);
this._$editorElm.appendTo($container);

// add a <span> in order to add spinner styling
$(`<span></span>`).appendTo($container);
}

// user might pass his own autocomplete options
const autoCompleteOptions: AutocompleteOption = this.columnEditor.editorOptions;
Expand Down

0 comments on commit 6ae5189

Please sign in to comment.