Show SummaryTag always in Multiselect even when no items are selected

1 Answer 139 Views
MultiSelect
Simon Störmer
Top achievements
Rank 1
Simon Störmer asked on 16 Aug 2023, 01:13 PM | edited on 16 Aug 2023, 01:14 PM

Hi, as described here https://www.telerik.com/kendo-angular-ui/components/dropdowns/multiselect/summary-tag-mode/#toc-basic-usage iam creating a MultiSelect component with a summary tag using the kendoMultiSelectSummaryTag directive and a custom kendoMultiSelectGroupTagTemplate .

But the summary tag is only visible, when  there is atleast one item selected.

Is it possible to show the summary tag even when there are no items selected?

E.g. somethink like "0 items selected"?

1 Answer, 1 is accepted

Sort by
1
Accepted
Tsvetelina
Telerik team
answered on 17 Aug 2023, 11:05 AM

Hi Simon,

To show the summary tag even when there are no selected items, the tagMapper callback function can be used. Please refer to the following Stackblitz example demonstrating this approach:

https://stackblitz.com/edit/angular-z354pn

In this case, the tagMapper function initially returns an empty tags array in order to render the summary tag.

I hope this helps.

Regards,
Tsvetelina
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
Simon Störmer
Top achievements
Rank 1
commented on 17 Aug 2023, 02:14 PM

Hi Tsvetelina,

thank you!

i testet that but that wasnt working, but i found the reason, why it was not working for me.

Now it is works like a charm!

Thank you!

Tags
MultiSelect
Asked by
Simon Störmer
Top achievements
Rank 1
Answers by
Tsvetelina
Telerik team
Share this question
or