From 8536e0e04f1168648251f517cb47ea2e7129e231 Mon Sep 17 00:00:00 2001 From: Ghislain B Date: Thu, 17 Aug 2023 00:53:21 -0400 Subject: [PATCH] fix: adding dataset hierarchical item shouldn't cause scroll flickering (#1076) - calling `datasetHierarchical` setter shouldn't cause scroll flickering, this was caused a call to the DataView `setItems` with an empty array that was meant to clear the dataset before recreating it, however this is certainly not needed since calling the `datasetHierarchical` setter will then trigger a new sort which will indirectly call DataView setItems anyway --- .../vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts | 1 - 1 file changed, 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 044cc8b5f..76de0cfed 100644 --- a/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts +++ b/packages/vanilla-bundle/src/components/slick-vanilla-grid-bundle.ts @@ -193,7 +193,6 @@ export class SlickVanillaGridBundle { // when a hierarchical dataset is set afterward, we can reset the flat dataset and call a tree data sort that will overwrite the flat dataset if (this.dataView && newHierarchicalDataset && this.slickGrid && this.sortService?.processTreeDataInitialSort) { - this.dataView.setItems([], this._gridOptions?.datasetIdPropertyName ?? 'id'); this.sortService.processTreeDataInitialSort(); // we also need to reset/refresh the Tree Data filters because if we inserted new item(s) then it might not show up without doing this refresh