diff --git a/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts b/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts index 57230a044..ab05f702a 100644 --- a/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts +++ b/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts @@ -70,7 +70,7 @@ export class SlickVanillaGridBundle { protected _darkMode = false; protected _collectionObservers: Array void; })> = []; protected _columnDefinitions?: Column[]; - protected _gridOptions?: GridOption; + protected _gridOptions: GridOption = {}; protected _gridContainerElm!: HTMLElement; protected _gridParentContainerElm!: HTMLElement; protected _hideHeaderRowAfterPageLoad = false; @@ -216,6 +216,7 @@ export class SlickVanillaGridBundle { } set gridOptions(options: GridOption) { + options ??= {} as GridOption; let mergedOptions: GridOption; // if we already have grid options, when grid was already initialized, we'll merge with those options