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

Commit 6e9af2a

Browse files
committed
fix: read external resource when required
- partially rolls back PR #1320 defining a global external resource for ExcelExport no longer worked.
1 parent 109227a commit 6e9af2a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,6 @@ export class AngularSlickgridComponent<TData = any> implements AfterViewInit, On
346346
throw new Error('Using `<angular-slickgrid>` requires [gridOptions] and [columnDefinitions], it seems that you might have forgot to provide them since at least of them is undefined.');
347347
}
348348

349-
// save resource refs to register before the grid options are merged and possibly deep copied
350-
// since a deep copy of grid options would lose original resource refs but we want to keep them as singleton
351-
this._registeredResources = ({ ...this.forRootConfig, ...this.gridOptions } as GridOption)?.externalResources || [];
352-
353349
this.initialization(this._eventHandler);
354350
this._isGridInitialized = true;
355351

@@ -1255,6 +1251,8 @@ export class AngularSlickgridComponent<TData = any> implements AfterViewInit, On
12551251

12561252
/** Pre-Register any Resource that don't require SlickGrid to be instantiated (for example RxJS Resource & RowDetail) */
12571253
protected preRegisterResources() {
1254+
this._registeredResources = this.gridOptions?.externalResources || [];
1255+
12581256
// Angular-Slickgrid requires RxJS, so we'll register it as the first resource
12591257
this.registerRxJsResource(new RxJsResource() as RxJsFacade);
12601258

0 commit comments

Comments
 (0)