This is a migrated thread and some comments may be shown as answers.

KendoReact Grid expand feature

2 Answers 257 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ruud
Top achievements
Rank 1
Ruud asked on 15 Oct 2019, 02:54 PM

Hi,

I'm in the middle of refactoring our current KendoUI/Js code base to KendoReact/TypeScript/Create React App. I try to use the KendoReact grid and am struggling with the expand and collapse feature; the little arrows which are available after you group a column.

The issue is that, as far as i understand the demo, expand works by modifying the actual data used in the grid by adding a "expanded" column. Then this updated dataset is stored in the state itself. Which is a defintely a no go area for me as I use React hooks to use my overall data. 

Are there alternatives to this approach? If not, is it on the roadmap? It's quite some work and a lot of code for getting features which are available in Kendo UI by just setting a switch (example: sortable).

Regards,

Ruud

2 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 16 Oct 2019, 09:53 AM

Hello, Ruud,

The same approach is working with Hooks as well.

This the useState hook, you can modify the dataItem expanded field as well and update the Grid data.

Please let me know if there is a specific issue updating the state using the useState hook.

In general, there are some differences between the KendoReact and the Kendo UI components mainly from the fact that React uses state and data immutability. The Kendo UI widgets use the dataSource to internally manage the data, wherein React this is bad practice to have difference between the data in the state and the one in the components.

Regards,
Stefan
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ruud
Top achievements
Rank 1
answered on 04 Nov 2019, 01:25 PM

Hi Stefan,

 

Thanks for the reply. I just wanted to avoid having to build my own wrappers around the KendoReact controls; I did expect it to be already available. But no worries, i will get there!

Regards,

Ruud

Tags
General Discussions
Asked by
Ruud
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Ruud
Top achievements
Rank 1
Share this question
or