Skip to content

Commit 844a929

Browse files
committed
Update data-performance-virtualization sample for React 19
1 parent 65ed803 commit 844a929

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

samples/grids/hierarchical-grid/data-performance-virtualization/src/RemoteService.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
const URL = `https://data-northwind.indigo.design/`;
22

3-
export function getData(dataState: any): any {
4-
return fetch(buildUrl(dataState))
5-
.then((result) => result.json());
3+
export async function getData(dataState: any): Promise<any> {
4+
const response = await fetch(buildUrl(dataState));
5+
const data = await response.json();
6+
return data;
67
}
78

89
function buildUrl(dataState: any) {

samples/grids/hierarchical-grid/data-performance-virtualization/src/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ import React, { useEffect, useRef } from "react";
22
import ReactDOM from "react-dom/client";
33
import "./index.css";
44

5-
import { IgrGridCreatedEventArgs, IgrHierarchicalGridModule } from "igniteui-react-grids";
5+
import { IgrGridCreatedEventArgs } from "igniteui-react-grids";
66
import { IgrHierarchicalGrid, IgrColumn, IgrRowIsland } from "igniteui-react-grids";
77

88
import "igniteui-react-grids/grids/combined";
99
import "igniteui-react-grids/grids/themes/light/bootstrap.css";
1010
import { getData } from "./RemoteService";
1111

12-
IgrHierarchicalGridModule.register();
13-
1412
export default function App() {
1513
const hierarchicalGrid = useRef<IgrHierarchicalGrid>(null);
1614

0 commit comments

Comments
 (0)