Skip to content

Commit ef054c9

Browse files
Merge pull request #3141 from telerik/dependabot/npm_and_yarn/examples/kendo-react-build-a-sales-dashboard/kendo-dependencies-48afff046e
chore: bump the kendo-dependencies group across 1 directory with 19 updates
2 parents 6fa3236 + 6a585a8 commit ef054c9

File tree

3 files changed

+40
-37
lines changed

3 files changed

+40
-37
lines changed

examples/kendo-react-build-a-sales-dashboard/package.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,34 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"@progress/kendo-data-query": "^1.7.0",
6+
"@progress/kendo-data-query": "^1.7.1",
77
"@progress/kendo-date-math": "^1.5.14",
8-
"@progress/kendo-drawing": "^1.21.1",
8+
"@progress/kendo-drawing": "^1.21.2",
99
"@progress/kendo-file-saver": "^1.1.2",
1010
"@progress/kendo-inputs-common": "^3.1.1",
1111
"@progress/kendo-intl": "^3.1.2",
12-
"@progress/kendo-licensing": "^1.3.3",
12+
"@progress/kendo-licensing": "^1.6.0",
1313
"@progress/kendo-popup-common": "^1.9.2",
14-
"@progress/kendo-react-animation": "^10.0.0",
15-
"@progress/kendo-react-buttons": "^10.0.0",
16-
"@progress/kendo-react-charts": "^10.0.0",
17-
"@progress/kendo-react-common": "^10.0.0",
18-
"@progress/kendo-react-data-tools": "^10.0.0",
19-
"@progress/kendo-react-dateinputs": "^10.0.0",
20-
"@progress/kendo-react-dialogs": "^10.0.0",
21-
"@progress/kendo-react-dropdowns": "^10.0.0",
22-
"@progress/kendo-react-grid": "^10.0.0",
23-
"@progress/kendo-react-inputs": "^10.0.0",
24-
"@progress/kendo-react-intl": "^10.0.0",
25-
"@progress/kendo-react-labels": "^10.0.0",
26-
"@progress/kendo-react-layout": "^10.0.0",
27-
"@progress/kendo-react-pdf": "^10.0.0",
28-
"@progress/kendo-react-popup": "^10.0.0",
29-
"@progress/kendo-react-progressbars": "^10.0.0",
30-
"@progress/kendo-react-ripple": "^10.0.0",
31-
"@progress/kendo-react-treeview": "^10.0.0",
14+
"@progress/kendo-react-animation": "^11.0.0",
15+
"@progress/kendo-react-buttons": "^11.0.0",
16+
"@progress/kendo-react-charts": "^11.0.0",
17+
"@progress/kendo-react-common": "^11.0.0",
18+
"@progress/kendo-react-data-tools": "^11.0.0",
19+
"@progress/kendo-react-dateinputs": "^11.0.0",
20+
"@progress/kendo-react-dialogs": "^11.0.0",
21+
"@progress/kendo-react-dropdowns": "^11.0.0",
22+
"@progress/kendo-react-grid": "^11.0.0",
23+
"@progress/kendo-react-inputs": "^11.0.0",
24+
"@progress/kendo-react-intl": "^11.0.0",
25+
"@progress/kendo-react-labels": "^11.0.0",
26+
"@progress/kendo-react-layout": "^11.0.0",
27+
"@progress/kendo-react-pdf": "^11.0.0",
28+
"@progress/kendo-react-popup": "^11.0.0",
29+
"@progress/kendo-react-progressbars": "^11.0.0",
30+
"@progress/kendo-react-ripple": "^11.0.0",
31+
"@progress/kendo-react-treeview": "^11.0.0",
3232
"@progress/kendo-ripple": "^1.0.2",
33-
"@progress/kendo-theme-material": "^10.0.1",
33+
"@progress/kendo-theme-material": "^11.0.2",
3434
"bootstrap-4-grid": "^3.4.0",
3535
"hammerjs": "^2.0.8",
3636
"react": "^18.2.0",

examples/kendo-react-build-a-sales-dashboard/src/components/GridContainer.js

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ import React from 'react';
22
import { Grid, GridColumn as Column } from '@progress/kendo-react-grid';
33
import { gridData } from '../data/appData';
44
import { Sparkline } from '@progress/kendo-react-charts';
5+
import { Checkbox } from '@progress/kendo-react-inputs';
6+
7+
const SparkLineChartCell = (props) => <td><Sparkline data={props.dataItem.PriceHistory} /></td>
8+
const ActiveCell = (props) => <td><Checkbox disabled defaultChecked={props.dataItem[props.field]} /></td>
59

6-
const SparkLineChartCell = (props) => <td><Sparkline data={props.dataItem.PriceHistory}/></td>
710
const processData = (data) => {
811
data.forEach((item) => {
912
item.PriceHistory = Array.from({ length: 20 }, () => Math.floor(Math.random() * 100));
@@ -15,20 +18,21 @@ const processData = (data) => {
1518
export const GridContainer = () => (
1619

1720
<div>
18-
<Grid style={{ height: '300px' }} data={processData(gridData)}>
19-
<Column field="ProductID" title="ID" width="40px" />
20-
<Column field="ProductName" title="Name" width="160px" />
21-
<Column field="Category.CategoryName" title="Category Name" width="80px" />
21+
<Grid
22+
style={{ height: '300px' }}
23+
data={processData(gridData)}
24+
defaultSort={[{
25+
field: "UnitPrice",
26+
dir:"asc"
27+
}]}
28+
sortable
29+
>
30+
<Column field="ProductID" title="ID" width="40px" sortable={false} />
31+
<Column field="ProductName" title="Name" />
2232
<Column field="UnitPrice" title="Price" width="80px" />
23-
<Column field="UnitsInStock" title="Stock" width="90px" />
24-
<Column field="PriceHistory" width="130px" cell={SparkLineChartCell} title="Price history" />
25-
<Column field="Discontinued" width="130px"
26-
cell={(props) => (
27-
<td>
28-
<input className="k-checkbox" type="checkbox" disabled defaultChecked={props.dataItem[props.field]} />
29-
<label className="k-checkbox-label"></label>
30-
</td>
31-
)} />
33+
<Column field="UnitsInStock" title="In stock" width="100px" sortable={false} />
34+
<Column field="PriceHistory"title="Price history" width="200px" cells={{ data: SparkLineChartCell }} sortable={false} />
35+
<Column field="Discontinued" title="Active" width="70px" cells={{ data: ActiveCell }} sortable={false} />
3236
</Grid>
3337
</div>
3438
);

examples/kendo-react-sales-dashboard/src/components/GridContainer.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class SparkLineChartCell extends React.Component {
1313

1414
class ActiveCell extends React.Component {
1515
render() {
16-
console.log(this.props.dataItem);
1716
return (
1817
<td><Checkbox disabled defaultChecked={this.props.dataItem[this.props.field]} /></td>
1918
)

0 commit comments

Comments
 (0)