From 33281eba2af374ee0a2419d98d9021a470a5c6a3 Mon Sep 17 00:00:00 2001 From: ghiscoding Date: Tue, 10 Dec 2024 23:03:09 -0500 Subject: [PATCH] feat(vanilla): allow using component w/o grid options --- .../vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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