Version 2023.1.117 - extra space in items when using templates and programmatic selection does not enable toolbar buttons

0 Answers 65 Views
ListBox
Erik
Top achievements
Rank 1
Iron
Iron
Erik asked on 15 Mar 2023, 02:56 PM | edited on 15 Mar 2023, 04:22 PM

Here is  a DOJO  example that illustrates these 2 issues:

DOJO

Issue 1: When using a full width template for listbox items, there is extra space above each item. This is due to the .k-list-item-text span you automatically create. It has a ::before pseudo element with content set to "\200b".  Is this intentional? My workaround is to override this element CSS to remove the content.

Issue 2: When programmatically selecting items in the list box, the toolbar buttons are not enabled like when a user clicks an item. Calling trigger('change') does not help. My workaround is to trigger a click event on the item instead of using the Select() Method, but I assume this is a bug?

Here is a second DOJO with the 2 workarounds implemented:

Workarounds DOJO

Georgi Denchev
Telerik team
commented on 20 Mar 2023, 11:38 AM

Hi, Erik,

Thank you for sharing your workarounds with the community, I am sure they'll be of help.

I left a response regarding the first problem in the following forum thread:

https://www.telerik.com/forums/listbox-item-template 

As for the second problem, this does look like a bug. A similar report has been logged here:

https://github.com/telerik/kendo-ui-core/issues/7217 

I'll add a note that the opposite behavior also occurs.

Best Regards,

Georgi

Erik
Top achievements
Rank 1
Iron
Iron
commented on 20 Mar 2023, 02:33 PM

Thank you!

No answers yet. Maybe you can help?

Tags
ListBox
Asked by
Erik
Top achievements
Rank 1
Iron
Iron
Share this question
or