HiIs there any way to select all child elements after selecting the groupto which they belong when using the grouping and multiselect featureson igCombo?
http://codepen.io/anon/pen/VKbWbr
Here is a codepen with the code i am using
Thanks
Hello Paulo,
In order to select group, onclick can be handled for the grouping header and then then the data source can be filtered to get only the items from that group and select the items by using the value method.
$('.ui-igcombo-group-header').on('click', function() { var clickedGroup = $(this).text(); var valuesToSelect = colors.filter(function(item) { return item.Type == clickedGroup; }).map(function(item) { return item.Name; }); $('#checkboxSelectCombo').igCombo("value", valuesToSelect);});
$('.ui-igcombo-group-header').on('click', function() { var clickedGroup = $(this).text();
var valuesToSelect = colors.filter(function(item) { return item.Type == clickedGroup; }).map(function(item) { return item.Name; });
$('#checkboxSelectCombo').igCombo("value", valuesToSelect);});
You can refer to the updated codepen.
Let me know if you have further questions on this matter.
Thank you very much.Works just fine.
It would be a good idea to add a native feature for this case.