jeudi 20 juillet 2017

How can i avoid a checkbox being automatically unchecked when dropdown list is closed?(angular js)

i have a ui-select directive for drop-down in my application..i have included a check boxes along the drop-down list.the value of the check-boxes are getting picked when checked....but the check-boxes seem to be auto unchecked when drop-down is closed...how to avoid this?

 <ui-select ng-model ="selectedCountryName">
   <ui-select-match placeholder ="Enter Country">
      <span>Country Selected</span>
        </ui-select-match>
   <ui-select-choices repeat="countries in vm.countriesList | filter:$select.search track by $index" position='down'>
   <div class="filter-box" ng-click="$event.stopPropagation();">
                    <label class='bx--checkbox__label modal-checkbox-label'>
                    <input class='bx--checkbox bx--checkbox--svg checkbox' type='checkbox' value='' checkboxValue ="country" name='' ng-model="checkedCountry[$index].checked"
                     ng-click="vm.toggleData($index,$event,checkedCountry[$index].checked,countries)">
                    <span class='bx--checkbox__appearance'>
                      <svg class='bx--checkbox__checkmark'>
                        <use xlink:href='images/carbon-theme-ui/sprite.svg#support--check-padding'></use>
                        </svg>
                      </span>
                     <span class='bx--checkbox__label-text'></span>
                  </label>
                  </div>
               </ui-select-choices>
             </ui-select>




Aucun commentaire:

Enregistrer un commentaire