TreeView - programmatically setting checkIndeterminate and item rendering

1 Answer 20 Views
TreeView
Grant
Top achievements
Rank 2
Veteran
Iron
Grant asked on 11 Aug 2021, 01:30 PM

Hi,

I have 2 questions:

1) How can i set the checkIndeterminate property? I tried just setting item.checkIndeterminate  = true, but nothing happened. Please advise as i cannot find any docs that detail this attribute.

2) Is is possible to NOT render a specific tree node without removing it from the dataset. I looked at the TreeView.item but it doesnt control the entire node, just the text after the expand/checked elements.

Thanks in Advance,

Grant

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 12 Aug 2021, 11:59 AM

Hello, Grant,

Regarding the questions:

1) This can be done using the checkIndeterminateField prop. I made an example as well.

2) Currently, this can indeed only be done by removing the item from the data. We have a task logged for providing a render for the full item. Once this is implemented, we can not render that item using that approach as well.

Regards,
Stefan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Grant
Top achievements
Rank 2
Veteran
Iron
commented on 12 Aug 2021, 12:10 PM

@Stefen, Thanks for getting back to me.

Regarding the checkIndeterminate, can it only be set on initialization? I've updated your example to check the top level items as Indeterminate, and there is no visual change to the tree, even though in the console, the dataset reflects that checkIndeterminate = true. See: https://stackblitz.com/edit/react-fqt12n-ivuygx?file=app/main.jsx.

Please advise.


Stefan
Telerik team
commented on 13 Aug 2021, 11:51 AM

After more tests, we decided to log an issue for this behavior as it has to be improved.

The status can be monitored here:

https://github.com/telerik/kendo-react/issues/1043

I also added some Telerik points to your account for bringing this to our attention.

Tags
TreeView
Asked by
Grant
Top achievements
Rank 2
Veteran
Iron
Answers by
Stefan
Telerik team
Share this question
or