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

How to have intermediate state for check box in the kendo react grid

3 Answers 166 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mukesh
Top achievements
Rank 1
Mukesh asked on 03 Jul 2019, 08:16 AM

Is there any way to have intermediate state for check box in kendo react grid.

If it is possible, how can we achieve that.

 

Regards,

Mukesh 

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 03 Jul 2019, 10:30 AM
Hello, Mukesh,

This is possible by setting the indeterminate property of the checkbox based on the selected items.

I have added this to the other example with checkbox selection from the previous ticket:

https://stackblitz.com/edit/react-valgmy-wpv761?file=app/main.jsx

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
Mukesh
Top achievements
Rank 1
answered on 03 Jul 2019, 12:04 PM

Hi i am not using class based component, i am working with functional component. I will not have render method.

And secondly i don't want to follow dom route, is there any property which will do the work for me.

This this example we need to iterate and keep track of that.

0
Stefan
Telerik team
answered on 04 Jul 2019, 11:06 AM
Hello, Mukesh,

Regarding the issues:

1) If the app is using functional components instead of in render this can executed in a separate function. The main idea is to execute it after the selection logic, so the array with the selected Ids is already updated to correctly determine intermediate  when the state has to be set.

2) As for following the DOM route, this is actually suggested by the React team in the following issue. Please check the following discussion:

https://github.com/facebook/react/issues/1798

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
Tags
General Discussions
Asked by
Mukesh
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Mukesh
Top achievements
Rank 1
Share this question
or