diff --git a/packages/common/src/services/grid.service.ts b/packages/common/src/services/grid.service.ts index 1f3705493..9462117e5 100644 --- a/packages/common/src/services/grid.service.ts +++ b/packages/common/src/services/grid.service.ts @@ -337,14 +337,14 @@ export class GridService { /** Select the selected row by a row index */ setSelectedRow(rowIndex: number) { - if (this._grid && this._grid.setSelectedRows) { + if (this._grid?.setSelectedRows) { this._grid.setSelectedRows([rowIndex]); } } /** Set selected rows with provided array of row indexes */ setSelectedRows(rowIndexes: number[]) { - if (this._grid && this._grid.setSelectedRows) { + if (this._grid?.setSelectedRows) { this._grid.setSelectedRows(rowIndexes); } } @@ -364,13 +364,13 @@ export class GridService { */ resetGrid(columnDefinitions?: Column[]) { // reset columns to original states & refresh the grid - if (this._grid && this._dataView) { + if (this._grid) { const originalColumns = this.sharedService.allColumns || []; if (Array.isArray(originalColumns) && originalColumns.length > 0) { // set the grid columns to it's original column definitions this._grid.setColumns(originalColumns); - if (this._gridOptions && this._gridOptions.enableAutoSizeColumns) { + if (this._gridOptions?.enableAutoSizeColumns) { this._grid.autosizeColumns(); } this.gridStateService.resetColumns(columnDefinitions); diff --git a/packages/common/src/services/gridState.service.ts b/packages/common/src/services/gridState.service.ts index 30705aadf..96bfd26db 100644 --- a/packages/common/src/services/gridState.service.ts +++ b/packages/common/src/services/gridState.service.ts @@ -34,7 +34,6 @@ declare const Slick: SlickNamespace; export class GridStateService { protected _eventHandler = new Slick.EventHandler(); protected _columns: Column[] = []; - protected _currentColumns: CurrentColumn[] = []; protected _grid!: SlickGrid; protected _subscriptions: EventSubscription[] = []; protected _selectedRowDataContextIds: Array | undefined = []; // used with row selection @@ -88,7 +87,6 @@ export class GridStateService { /** Dispose of all the SlickGrid & PubSub subscriptions */ dispose() { - this._currentColumns = []; this._columns = []; // unsubscribe all SlickGrid events @@ -217,7 +215,6 @@ export class GridStateService { } }); } - this._currentColumns = currentColumns; return currentColumns; } @@ -253,11 +250,7 @@ export class GridStateService { */ getCurrentColumns(): CurrentColumn[] { let currentColumns: CurrentColumn[] = []; - if (this._currentColumns && Array.isArray(this._currentColumns) && this._currentColumns.length > 0) { - currentColumns = this._currentColumns; - } else { - currentColumns = this.getAssociatedCurrentColumns(this._grid.getColumns()); - } + currentColumns = this.getAssociatedCurrentColumns(this._grid.getColumns()); return currentColumns; } diff --git a/packages/common/src/styles/slick-grid.scss b/packages/common/src/styles/slick-grid.scss index 98c2f07f2..8fd040624 100644 --- a/packages/common/src/styles/slick-grid.scss +++ b/packages/common/src/styles/slick-grid.scss @@ -24,7 +24,6 @@ display: inline-block; box-sizing: content-box !important; /* this here only for Firefox! */ overflow: hidden; - -o-text-overflow: ellipsis; text-overflow: ellipsis; height: 16px; line-height: 16px; @@ -140,7 +139,6 @@ display: inline-block; box-sizing: content-box !important; overflow: hidden; - -o-text-overflow: ellipsis; text-overflow: ellipsis; height: 16px; line-height: 16px; diff --git a/packages/vanilla-bundle/dist-grid-bundle-zip/slickgrid-vanilla-bundle.zip b/packages/vanilla-bundle/dist-grid-bundle-zip/slickgrid-vanilla-bundle.zip index 6467f8d3b..0280b9db6 100644 Binary files a/packages/vanilla-bundle/dist-grid-bundle-zip/slickgrid-vanilla-bundle.zip and b/packages/vanilla-bundle/dist-grid-bundle-zip/slickgrid-vanilla-bundle.zip differ