2 line kendoMultiSelectItemTemplate with Virtualization.

2 Answers 38 Views
MultiSelect
Alex
Top achievements
Rank 1
Iron
Alex asked on 21 Sep 2023, 03:54 PM
Hi all.
There is a large array of data, so I use virtualization.
The element needs to have 2 lines; if I do this, the styles break.
https://stackblitz.com/edit/angular-rgcbjk?file=src%2Fapp%2Fapp.comComponent.ts
Moreover, if you remove virtualization, everything is ok.

2 Answers, 1 is accepted

Sort by
0
Accepted
Martin
Telerik team
answered on 26 Sep 2023, 06:46 AM

Hi Alex,

When virtualization is enabled, the itemHeight needs to be set to ensure a smooth scrolling (in this example, this is 28px). Using a custom template and <br> tag for the item text, requires a bigger height, but since the itemHeight is set, the text is overlapped.

Set the itemHeight to a bigger value in order to avoid overlapping the text:

https://stackblitz.com/edit/angular-rgcbjk-41uqdh?file=src%2Findex.html,src%2Fapp%2Fapp.component.ts

Regards,
Martin
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
0
Alex
Top achievements
Rank 1
Iron
answered on 21 Sep 2023, 05:19 PM
To enable the virtual scrolling, pass a VirtualizationSettings object to the virtual input property and specify the desired itemHeight.
Tags
MultiSelect
Asked by
Alex
Top achievements
Rank 1
Iron
Answers by
Martin
Telerik team
Alex
Top achievements
Rank 1
Iron
Share this question
or