Skip to content

Commit 7b6afc4

Browse files
committed
chore: update grid props
1 parent 124a5ac commit 7b6afc4

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

examples/kendo-react-ssr/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
"@babel/preset-env": "^7.23.5",
77
"@babel/preset-react": "^7.23.3",
88
"@babel/register": "^7.22.15",
9-
"@progress/kendo-data-query": "^1.7.0",
9+
"@progress/kendo-data-query": "^1.7.1",
1010
"@progress/kendo-date-math": "^1.5.14",
1111
"@progress/kendo-drawing": "^1.21.2",
1212
"@progress/kendo-inputs-common": "^3.1.1",
1313
"@progress/kendo-intl": "^3.1.2",
14-
"@progress/kendo-licensing": "^1.3.5",
14+
"@progress/kendo-licensing": "^1.6.0",
1515
"@progress/kendo-popup-common": "^1.9.2",
1616
"@progress/kendo-react-animation": "^11.0.0",
1717
"@progress/kendo-react-buttons": "^11.0.0",

examples/kendo-react-ssr/src/App.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@ import './App.css';
33

44
import { Grid, GridColumn } from '@progress/kendo-react-grid';
55
import { Tooltip } from '@progress/kendo-react-tooltip';
6-
import { process } from '@progress/kendo-data-query';
76

87
import '@progress/kendo-theme-default/dist/all.css';
9-
10-
118
import products from './products.json';
129

1310
const MyCustomCell = (props) => {
@@ -35,19 +32,20 @@ const MyTooltipTemplate = (props) => {
3532
}
3633

3734
function App() {
38-
const [dataState, setDataState] = React.useState({ skip: 0, take: 10 })
3935
return (
4036
<div>
4137
<Tooltip content={MyTooltipTemplate} anchorElement="target" position="right">
4238
<Grid
39+
data={products}
40+
autoProcessData={true}
41+
dataItemKey='ProductID'
4342
pageable
4443
sortable
45-
data={process(products, dataState)}
46-
{...dataState}
47-
onDataStateChange={(e) => setDataState(e.dataState)}
44+
defaultSkip={0}
45+
defaultTake={10}
4846
>
4947
<GridColumn field="ProductID" title="Product Id" filter="numeric" />
50-
<GridColumn field="ProductName" title="Product Name" cell={MyCustomCell} />
48+
<GridColumn field="ProductName" title="Product Name" cells={{ data: MyCustomCell }} />
5149
<GridColumn field="UnitsInStock" title="Units In Stock" filter="numeric" />
5250
</Grid>
5351
</Tooltip>

0 commit comments

Comments
 (0)