From 24cf4150e24b822e9466405e75f3c422dc12dbe9 Mon Sep 17 00:00:00 2001 From: Wei Wu <96556502+scnwwu@users.noreply.github.com> Date: Thu, 19 Dec 2024 22:05:33 -0500 Subject: [PATCH] fix: adopt AG Grid 33 (#1335) --- client/src/webview/DataViewer.tsx | 1 + client/src/webview/useDataViewer.ts | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/client/src/webview/DataViewer.tsx b/client/src/webview/DataViewer.tsx index fe3bffbed..53fd86725 100644 --- a/client/src/webview/DataViewer.tsx +++ b/client/src/webview/DataViewer.tsx @@ -52,6 +52,7 @@ const DataViewer = () => { maxBlocksInCache={10} onGridReady={onGridReady} rowModelType="infinite" + theme="legacy" /> ); diff --git a/client/src/webview/useDataViewer.ts b/client/src/webview/useDataViewer.ts index 2e232a559..7169f12a1 100644 --- a/client/src/webview/useDataViewer.ts +++ b/client/src/webview/useDataViewer.ts @@ -2,7 +2,13 @@ // SPDX-License-Identifier: Apache-2.0 import { useCallback, useEffect, useState } from "react"; -import { ColDef, GridReadyEvent, IGetRowsParams } from "ag-grid-community"; +import { + AllCommunityModule, + ColDef, + GridReadyEvent, + IGetRowsParams, + ModuleRegistry, +} from "ag-grid-community"; import { v4 } from "uuid"; import { TableData } from "../components/LibraryNavigator/types"; @@ -12,6 +18,8 @@ import columnHeaderTemplate from "./columnHeaderTemplate"; declare const acquireVsCodeApi; const vscode = acquireVsCodeApi(); +ModuleRegistry.registerModules([AllCommunityModule]); + const contextMenuHandler = (e) => { e.stopImmediatePropagation(); };