@skyux/ag-grid 13.11.1 → 13.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -970,10 +970,10 @@ class SkyAgGridDataManagerAdapterDirective {
970
970
  }
971
971
  }
972
972
  #applySort(dataState) {
973
- const agGrid = this.#currentAgGrid();
973
+ const agGridApi = this.#currentAgGrid()?.api;
974
974
  const activeSort = dataState.activeSortOption;
975
- if (activeSort) {
976
- agGrid?.api.applyColumnState({
975
+ if (agGridApi && activeSort) {
976
+ agGridApi.applyColumnState({
977
977
  state: [
978
978
  {
979
979
  colId: activeSort.id,
@@ -1009,13 +1009,13 @@ class SkyAgGridDataManagerAdapterDirective {
1009
1009
  }
1010
1010
  #applyColumnWidths(breakpoint) {
1011
1011
  breakpoint ??= this.#breakpoint();
1012
- const currentAgGrid = this.#currentAgGrid();
1012
+ const currentAgGridApi = this.#currentAgGridReady()?.api;
1013
1013
  const viewId = this.viewId();
1014
- if (breakpoint) {
1014
+ if (breakpoint && currentAgGridApi) {
1015
1015
  const viewState = viewId && this.#currentDataState?.getViewStateById(viewId);
1016
1016
  if (viewState && viewState.columnWidths && viewState.displayedColumnIds) {
1017
1017
  const columnLimits = this.#getGridColumnLimits(viewState.displayedColumnIds, viewState.columnWidths, toColumnWidthName(breakpoint));
1018
- currentAgGrid?.api.sizeColumnsToFit({ columnLimits });
1018
+ currentAgGridApi.sizeColumnsToFit({ columnLimits });
1019
1019
  }
1020
1020
  }
1021
1021
  }