Gain focus back on checkbox after server update

cnough
Tera Contributor

For the keyboard users, I'm trying to get the checkbox to regain its focus back after the server update that gets called by ng-click. How can I accomplish this?

 

<div ng-repeat="obj in c.data.list">

  <input type="checkbox" id="obj.id" ng-model="obj.a" ng-checked="{{obj.a}}" ng-click="c.selected(obj)" />

  <label>{{obj.name}}</label>

</div>

 

c.selected = function(obj) {

  c.data.action = "updateCheckboxSelected";

  c.server.update().then() {

      // not sure how to focus that checkbox from here

  });

});

0 REPLIES 0