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

TreeView scrollbar

5 Answers 610 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Matej
Top achievements
Rank 1
Veteran
Matej asked on 29 Jul 2020, 11:00 AM

How to enable bottom scrollbar on a TreeView? Right now the component is checking only for the first level item width and everything else is cut and without bottom scrollbar.  example

5 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 29 Jul 2020, 12:17 PM

Hello, Matej,

The TreeView design is to expand based on the content. If we set a fixed width to it, it will automatically show a scrollbar. The width can be set with a className and CSS:

https://stackblitz.com/edit/react-haaavq-lvxqpu?file=index.html

Please let me know if you need additional information on this matter.

Regards,
Stefan
Progress Telerik

0
Matej
Top achievements
Rank 1
Veteran
answered on 29 Jul 2020, 12:29 PM
Not sure I understand. Even in your example all sub-items are cut and the scroll is working only for first level items. See attached screenshot.
0
Accepted
Stefan
Telerik team
answered on 29 Jul 2020, 01:32 PM

Hello, Matej,

My apologies, indeed the items are still cut.

This can be resolved with the following CSS:

.k-treeview-item .k-animation-container{
  overflow: inherit;
}
This is the updated example:

https://stackblitz.com/edit/react-haaavq-lvxqpu?file=index.html

Everything seems visible now.

Regards,
Stefan
Progress Telerik

0
Matej
Top achievements
Rank 1
Veteran
answered on 30 Jul 2020, 01:44 PM
Thank you. Is this going to be part of your styles in the future or are there any conflicts with existing styles?
0
Stefan
Telerik team
answered on 30 Jul 2020, 02:05 PM

Hello, Matej,

Currently, we do not plan changes to this part of the styles.

If any issues occur after updating in the future, please let us know and we will investigate.

Regards,
Stefan
Progress Telerik

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