diff --git a/kendo-react-grid-crud/ClientApp/src/App.js b/kendo-react-grid-crud/ClientApp/src/App.js
index 5e92e62..e3b641a 100644
--- a/kendo-react-grid-crud/ClientApp/src/App.js
+++ b/kendo-react-grid-crud/ClientApp/src/App.js
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
-import { Route } from 'react-router';
+import { Route, Routes } from 'react-router';
import { Layout } from './components/Layout';
import { Home } from './components/Home';
import { Counter } from './components/Counter';
@@ -9,11 +9,14 @@ import './custom.css'
export default class App extends Component {
static displayName = App.name;
- render () {
+ render() {
return (
-
-
+
+ } />
+ } />
+
+
);
}
diff --git a/kendo-react-grid-crud/ClientApp/src/components/Counter.js b/kendo-react-grid-crud/ClientApp/src/components/Counter.js
index 05441a2..c2c969c 100644
--- a/kendo-react-grid-crud/ClientApp/src/components/Counter.js
+++ b/kendo-react-grid-crud/ClientApp/src/components/Counter.js
@@ -1,4 +1,5 @@
import React, { Component } from 'react';
+import { Button } from "@progress/kendo-react-buttons";
export class Counter extends Component {
static displayName = Counter.name;
@@ -24,7 +25,7 @@ export class Counter extends Component {
Current count: {this.state.currentCount}
-
+
);
}
diff --git a/kendo-react-grid-crud/ClientApp/src/components/Home.js b/kendo-react-grid-crud/ClientApp/src/components/Home.js
index a83cb61..1453794 100644
--- a/kendo-react-grid-crud/ClientApp/src/components/Home.js
+++ b/kendo-react-grid-crud/ClientApp/src/components/Home.js
@@ -3,6 +3,7 @@ import '@progress/kendo-theme-default/dist/all.css'
import { useState, useEffect } from "react";
import { Grid, GridColumn, GridToolbar } from '@progress/kendo-react-grid';
+import { Button } from "@progress/kendo-react-buttons";
import { mapTree } from "@progress/kendo-react-treelist";
import { clone } from '@progress/kendo-react-common';
@@ -60,7 +61,15 @@ const Home = (props) => {
let dateWitnNotimeZone = new Date(
myToday.getTime() - offsetMiliseconds
);
- let newRecord = { productID: null, firstOrderedOn: dateWitnNotimeZone, category: { categoryID: 1, categoryName: "Beverages"}, inEdit: true }
+ let newRecord = {
+ productID: null,
+ firstOrderedOn: dateWitnNotimeZone,
+ category: { categoryID: 1, categoryName: "Beverages" },
+ inEdit: true,
+ ProductName: 'New Product',
+ Discontinued: false,
+ UnitsInStock: 1
+ }
let newData = [...data];
newData.unshift(newRecord);
setData(newData)
@@ -104,7 +113,7 @@ const Home = (props) => {
take: dataState.take,
skip: dataState.skip
}
- Axios.delete("https://localhost:44487/products", { data: { ...data, product: dataItem }}).then(
+ Axios.delete("https://localhost:44487/products", { data: { ...data, product: dataItem } }).then(
(response) => {
let parsedDataNew = mapTree(response.data.data, 'items', item => {
item.firstOrderedOn = new Date(item.firstOrderedOn);
@@ -224,45 +233,45 @@ const Home = (props) => {
cancel: cancel
}}
>
-
-
-
-
+
+
+
-
-
-
-
+
+
+
+
)
diff --git a/kendo-react-grid-crud/ClientApp/src/components/cells/CommandCell.jsx b/kendo-react-grid-crud/ClientApp/src/components/cells/CommandCell.jsx
index ebe35b8..cab0eff 100644
--- a/kendo-react-grid-crud/ClientApp/src/components/cells/CommandCell.jsx
+++ b/kendo-react-grid-crud/ClientApp/src/components/cells/CommandCell.jsx
@@ -1,4 +1,5 @@
import * as React from "react";
+import { Button } from "@progress/kendo-react-buttons";
import DataContext from '../../contexts/data-context';
const MyCommandCell = props => {
@@ -37,20 +38,20 @@ const MyCommandCell = props => {
return inEdit ?
(
-
+
{isNewItem ? "Add" : "Update"}
-
-
+
+
{isNewItem ? "Discard" : "Cancel"}
-
+
| ) :
(
-
+
Edit
-
-
+
+
Remove
-
+
| );
};
diff --git a/kendo-react-grid-crud/ClientApp/src/index.js b/kendo-react-grid-crud/ClientApp/src/index.js
index 35bd734..f54cb99 100644
--- a/kendo-react-grid-crud/ClientApp/src/index.js
+++ b/kendo-react-grid-crud/ClientApp/src/index.js
@@ -1,6 +1,6 @@
import 'bootstrap/dist/css/bootstrap.css';
import React from 'react';
-import ReactDOM from 'react-dom';
+import { createRoot } from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import App from './App';
import * as serviceWorkerRegistration from './serviceWorkerRegistration';
@@ -9,11 +9,11 @@ import reportWebVitals from './reportWebVitals';
const baseUrl = document.getElementsByTagName('base')[0].getAttribute('href');
const rootElement = document.getElementById('root');
-ReactDOM.render(
+createRoot(rootElement).render(
- ,
- rootElement);
+
+);
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
diff --git a/kendo-react-grid-crud/ClientApp/src/setupProxy.js b/kendo-react-grid-crud/ClientApp/src/setupProxy.js
index 3284f6d..8ab34c9 100644
--- a/kendo-react-grid-crud/ClientApp/src/setupProxy.js
+++ b/kendo-react-grid-crud/ClientApp/src/setupProxy.js
@@ -1,4 +1,4 @@
-const createProxyMiddleware = require('http-proxy-middleware');
+const { createProxyMiddleware } = require("http-proxy-middleware");
const { env } = require('process');
const target = env.ASPNETCORE_HTTPS_PORT ? `https://localhost:${env.ASPNETCORE_HTTPS_PORT}` :