How do I save data from multiple kendo checkboxes?

1 Answer 190 Views
Input
Vincent
Top achievements
Rank 3
Iron
Iron
Iron
Vincent asked on 19 Aug 2021, 01:08 PM

I want to save the values of multiple checkboxes to a single array like so:

https://codepen.io/ktsn/pen/wXbPLR

However this approach won't work with the kendo checkboxes since they only return a boolean:

https://stackblitz.com/edit/7bgzdd?file=src/main.vue

 

What's the best option here if I want to use multiple kendo checkboxes and save their values to a single array?

1 Answer, 1 is accepted

Sort by
2
Accepted
Petar
Telerik team
answered on 20 Aug 2021, 08:25 AM

Hi Vincent,

Here is a StackBlitz example demonstrating how the targeted functionality can be implemented with the current implementation of the Native Checkbox component. 

Based on your example, we will consider improvements in the way the Checkbox works in scenarios like yours.

I hope the suggested solution will fit the needs of the application you are working on.

Regards,
Petar
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/.

Vincent
Top achievements
Rank 3
Iron
Iron
Iron
commented on 20 Aug 2021, 08:48 AM

Perhaps you could make a new component called "CheckList" for a list of Kendo Checkboxes. 

It could use the same 'data-items' prop as MultiSelect:

https://www.telerik.com/kendo-vue-ui/components/dropdowns/multiselect/


Petar
Telerik team
commented on 20 Aug 2021, 08:59 AM

Thank you for your suggestion, Vincent. We have a plan of releasing a component called CheckboxGroup that should handle the discussed scenario. 
Vincent
Top achievements
Rank 3
Iron
Iron
Iron
commented on 20 Aug 2021, 09:03 AM

Sounds good, do you have an ETA on that?
Petar
Telerik team
commented on 20 Aug 2021, 12:21 PM

Hi Vincent.

Currently, we cannot point to an exact delivery date for the CheckboxGroup component. 

Tags
Input
Asked by
Vincent
Top achievements
Rank 3
Iron
Iron
Iron
Answers by
Petar
Telerik team
Share this question
or