Skip to content

Commit ba3a444

Browse files
authored
fix: Resolve the breaking change introduced by AG Grid 32.0 (#1097)
1 parent b8c4798 commit ba3a444

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

client/src/webview/useDataViewer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33
import { useCallback, useEffect, useState } from "react";
44

5-
import { ColDef, IGetRowsParams } from "ag-grid-community";
5+
import { ColDef, GridReadyEvent, IGetRowsParams } from "ag-grid-community";
66
import { v4 } from "uuid";
77

88
import { TableData } from "../components/LibraryNavigator/types";
@@ -91,7 +91,7 @@ const useDataViewer = () => {
9191
const [columns, setColumns] = useState([]);
9292

9393
const onGridReady = useCallback(
94-
(event) => {
94+
(event: GridReadyEvent) => {
9595
const dataSource = {
9696
rowCount: undefined,
9797
getRows: async (params: IGetRowsParams) => {
@@ -115,7 +115,7 @@ const useDataViewer = () => {
115115
},
116116
};
117117

118-
event.api.setDatasource(dataSource);
118+
event.api.setGridOption("datasource", dataSource);
119119
},
120120
[columns],
121121
);

0 commit comments

Comments
 (0)