UPDATE: This is live code I prepared for you: https://stackblitz.com/edit/react-ts-dhhsaz?file=index.tsx
I get error:
Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
But error appears to be inside KendoDrawer component. I can't figure out what is wrong. This is my component:
import React, { useState } from 'react';
import { withRouter, useLocation, useHistory } from 'react-router-dom';
import { Drawer, DrawerContent } from '@progress/kendo-react-layout';
import { Button } from '@progress/kendo-react-buttons';
export const SidebarDrawer = (props:any) => {
const items = [
{ text: 'Povezivanje', icon: 'k-i-inbox', selected: true, route: '/povezivanje' },
{ separator: true },
{ text: 'Notifications', icon: 'k-i-bell', route: '/notifications' },
{ text: 'Calendar', icon: 'k-i-calendar', route: '/calendar' },
{ separator: true },
{ text: 'Attachments', icon: 'k-i-hyperlink-email', route: '/attachments' },
{ text: 'Favourites', icon: 'k-i-star-outline', route: '/favourites' }
];
const [expanded, setExpanded] = React.useState(true);
const [position, setPosition] = React.useState(true);
const [selectedId, setSelectedId] = React.useState(items.findIndex(x => x.selected === true));
let positionMode = position ? 'start' : 'end';
const handleSelect = (ev:any) => {
setSelectedId(ev.itemIndex);
setExpanded(false);
};
const handleClick = () => { setExpanded(prevState => !prevState); };
const handleChange = () => { setPosition(prevState => !prevState); };
const drawerProps = {
expanded: expanded,
position: positionMode,
mode: 'push',
items: items.map(
(item, index) => ({ ...item, selected: index === selectedId })),
onSelect: handleSelect,
}
return (
<Drawer {...drawerProps}>
<DrawerContent>
{props.children}
</DrawerContent>
</Drawer >
);
};
export default withRouter(SidebarDrawer);
And this is how I use it inside App component:
import React, { useState } from 'react';
import { hot } from 'react-hot-loader';
import { Button } from '@progress/kendo-react-buttons'
import { Grid, GridColumn, GridDetailRow, GridToolbar } from '@progress/kendo-react-grid';
import '@progress/kendo-theme-bootstrap/dist/all.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import { Drawer, DrawerContent } from '@progress/kendo-react-layout';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import urlConstants from 'ClientApp/constants/urlConstants'
import { Connecting } from '../containers/connecting/Connecting';
import SidebarDrawer from 'ClientApp/components/SidebarDrawer/SidebarDrawer';
export const App: React.FC = () => {
return (
<React.Fragment>
<Router>
<SidebarDrawer>
<Switch>
<Route exact={true} path="/" component={Connecting} />
</Switch>
</SidebarDrawer>
</Router>
</React.Fragment>
)
}
export default hot(module)(App);
Hi,
I'm working on a grid which has an action cell with buttons, which of course i dont want to export, but when i try to pass a custom column configuration to the export it fallbacks to the grid's one.
I made further investigation on the kendo-react-private repository and i found out that effectively there's a preference for the grid columns rather than custom
more precisely on kendo-react-private>packages>excel>src>ExcelExport.tsx (line 201~206)
const columns = this.extractColumns(
gridColumns ||
externalColumns ||
this.props.columns ||
React.Children.toArray(children)
);
this is the piece of code i was talking about.
as you can see if gridColumns has a value is preferred rather than externalColumns
it would be nice to have a property onto the grid column definition stating if that column should be exported or not (best case)
or just preferring externalColumns to gridColumns (base case)
Hi
Would it be possible to add an option/prop to the KendoReact spreadsheet component to make the whole workbook or specific sheets read-only, instead of specifying cell ranges?
This would make it easier when users need to view a file/spreadsheet without editing it.
Thanks
My team is using KendoReact Gantt to build a web app for manage/planning task in Scrum
It is nice to have feature which display and customizable the current time marker on Gantt.
Integrated tooltip to react data grid, but when I drag & drop column header to group it by column, It displays the tooltip text instead of column field title
Dear Telerik Support Team,
Our development team relies on Telerik Kendo DevCraft Ultimate, specifically the Kendo React components, for our projects. We have a suggestion that would greatly improve our developer experience.
When using MUI components, we appreciated the seamless integration with VSCode. Hovering over an MUI component name would display a tooltip with a brief description and a clickable link to the MUI API documentation. This feature allowed us to quickly access examples and API details.
MUI with VSCode
Unfortunately, this feature is absent in Kendo React. We lack a tooltip popup with a direct link to the online Kendo React API documentation. Consequently, it has become challenging for our developers to find examples and access component documentation without manual searches.
KendoReact with VSCode
We kindly request an enhanced API integration in Kendo React. Adding a tooltip popup with a brief description and clickable link to the online Kendo React API documentation would greatly streamline our workflow, saving us time and improving productivity.
Thank you for your continuous support and commitment to the developer community. We eagerly await your positive response and hope to see this feature included in the Kendo React ecosystem.
Hi,
Using KendoReact Scheduler component the functionality to group the events by date, then by resources is not supported. I can only group them by resources first, then by date.
This feature exists in Kendo for jQuery Scheduler component and can be configured by setting the group.date property to true as following:
group: {
date: true,
resources: ["Rooms"]
}
resulting in something similar as in the picture below.
We need the same functionality in KendoReact Scheduler component as well.
Thanks,
Camelia
Hi,
Using KendoReact Scheduler component the functionality to group the events by date, then by resources is not supported. I can only group them by resources first, then by date.
This feature exists in Kendo for jQuery Scheduler component and can be configured by setting the group.date property to true as following:
group: {
date: true,
resources: ["Rooms"]
}
hi,
I have attached the file there is a pie chart the labels are outside the pie chart, so I need the labels inside the pie chart ,
also in the bullet chart, I am unable to rid of the labels and title.
thank you
Current Behaviour
When a table is created in the text editor and multiple columns are selected an error is thrown.
Errors:
TypeError: Cannot read properties of undefined (reading 'localsInner')
TypeError: Cannot read properties of undefined (reading 'eq')
Expected Behaviour
When a table is created in the text editor and multiple columns are selected an error must not appear and the user must be able to merge or split the cells.
MInimal Reproduction
I'm providing a reproduction from Kendo React code examples.
https://stackblitz.com/edit/react-su15wr?file=app%2Fmain.tsx
Package
"@progress/kendo-react-editor": "^5.11.0"
We have problems with the grid because for no reason a 'display:none' appears, specifically in this creation action
We can't understand when the error might occur, we think it's a coincidence of class names.
Can you guide us through this error?
It is my first time raising a support contact so I don't know what background they can mostly support.Hi, when using the Kendo React Typography component like following:
<Typograpy.h1></Typograpy.h1>
compiler gives the following warning:
Imported JSX component h6 must be in PascalCase or SCREAMING_SNAKE_CASE react/jsx-pascal-case
We would like to use Kendo React to build a micro frontend UI but we did not found any relevant information that this is currently supported.
The main issue we are facing is how it isolate Kendo theme styling between different micro frontends.
Let's say we have 2 micro frontends A and B:
- A is using Kendo v6.
- B is using Kendo v7 (or some other future/past version).
Both of them will include their global Kendo styles which will collide.
After some investigation, we came up with 2 possible approaches:
We have experimented with the second approach and it seems like a way to go. It also required to append all popups to root DOM node of a micro frontend which can be done easily using PopupPropsContext.
But adding a class to all Kendo CSS selector is technically not a trivial task. It would be nice if Kendo supported this out of the box, for example by providing some SCSS configuration variable.
I've noticed in your other products, the dropdownlists have a property that allows for grouping sets of data.
What would it take to get that included in Kendo UI React?
We have a use case that this would be very helpful.
Thanks.