Posted 14 September 2017, 11:11 am EST
Hi,
In wijimo multi-select list, can you provide me an example achieving the following task.
When user selects atleast item from the multi-select list the button should be enabled (Angular). I am not able to get this working out, I am working for an IT company currently.
My sample code that I used is:
JS:
self.budgetGroup = ;
self.bgSelectionChanged = function(s, e) {
//1. get the selected item.
var items = s.checkedItems;
if(items != null && items != undefined) {
for (var i = 0; i < self.budgetGroup.length; i++) {
if(items.bgId == self.budgetGroup.bgId) {
// pop the element
console.log(‘removed item’);
self.budgetGroup.splice(i, 1);
}
}
if(items.selected == false) {
console.log(‘pushed item’);
self.budgetGroup.push(items);
}
}
self.count = self.budgetGroup.length;
};
HTML:
<div class=”col-lg-9″>
<wj-list-box
style=”height:275px; width:100%”
initialized=”initialize()”
items-source=”addEditBudgetGroupRowCtrl.bgDataProvider”
selected-item=”addEditBudgetGroupRowCtrl.selectedBG”
display-member-path=”label”
selected-value-path = “bgRoleId”
checked-member-path=”selected”
selected-items-changed=”addEditBudgetGroupRowCtrl.bgSelectionChanged(s, e)”>
</wj-list-box>
</div>