jeudi 30 novembre 2017

AngularJs- Checkbox issue in safari

I have a checkbox and dropdown. When I set checkbox to true and select an option from dropdown, checkbox clears itself.

In other browsers code is working fine but showing this strange behavior in safari.

    Below is my html and js:

    <div class="form-group">
               <div class="col-md-12">
                    <div class="col-md-3">
                      <span ng-repeat="bRelation in Relations|limitTo: 3">
                      <label class="checkbox" for="">
                          <input type="checkbox" class="b-relation" ng-model="group" value="" ng-change="checkRelation(bRelation.Id)" name="group" id="" />
                          
                          <select class="form-control brelationnum" name="brelationnum" style="display:inline;">
                            <option value="">-- Relatives Count --</option>
                            <option value="1">1</option>
                            <option value="2">2</option>
                            <option value="3">3</option>
                            <option value="4">4</option>
                          </select>
                      </label>
                      </span>
                    </div>
                </div>
          </div>

$scope.Relations = [
    {'Id' : '1', 'Text' : 'Grandmother' },
    {'Id' : '2', 'Text' : 'Mother' },
    {'Id' : '3', 'Text' : 'Sister' }
];

I have created a Pluker here: Checkbox issue in safari

Can someone help me with the issue?




Aucun commentaire:

Enregistrer un commentaire