5 Answers, 1 is accepted
Currently, a similar result could be achieved using the itemRender property of the MultiSelect and flattening of the grouped data(if already grouped). Also, to achieve the functionality where the group name stays at the top if the items are more than the viewport. The header property has to be set and updated dynamically on a scroll:
https://www.telerik.com/kendo-react-ui/components/dropdowns/multiselect/custom-rendering/#toc-items
https://www.telerik.com/kendo-react-ui/components/dropdowns/multiselect/custom-rendering/#toc-headers-and-footers
We have made an example demonstrating how this can be achieved with the current state of the MultiSelect component:
https://stackblitz.com/edit/react-e4yvnp?file=app%2Fmain.js
I hope this is helpful.
Regards,
Stefan
Progress Telerik
Hi Stefan,
In the 2 years since this answer, is there a better way to handle grouping in a kendoReact Multiselect?
The reason I ask is because my data is different from the one you have mocked up, in that for me, each record has a group identifier. in my case, its a list of cities, and each one has a province.
Your mock shows that only the first item of the group has the group identifier, and im having trouble modifying it to my use case.
Please advise.
Thanks,
Grant
Hello, Grant,
We are actually currently working on support for this out of the box.
The task is currently in development and we expect to have it live early next year.
The task is for the DropDownList, but as the components share most of the functionalities I assume we will have it for the MultiSelect as well.
Please follow this item for updates:
https://feedback.telerik.com/kendo-react-ui/1442778-dropdownlist-group-items
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/.
Hi Stefen,
Thanks fort he feedback. The linked issue says its 'Unplanned', when do you expect this to move up the list?
I ask because my feature depends on this grouping and if its not going to be done early next year, I need to start investigating alternatives.
Thanks,
Grant
Hello, Grant,
We have just not updated the status in real time.
The feature is in development and I updated the status.
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/.