angular-selectize icon indicating copy to clipboard operation
angular-selectize copied to clipboard

how to get focus?

Open suiteappdev opened this issue 9 years ago • 0 comments

how to set focus on selectize input control on config? This work for me but is the way?

  settings.onInitialize = function() {
    selectize = element[0].selectize;

    setSelectizeOptions(scope.options);

    if(scope.config.setFocus){
      selectize.focus();
    }
    //provides a way to access the selectize element from an
    //angular controller
    if (scope.config.onInitialize) {
      scope.config.onInitialize(selectize);
    }

    scope.$watchCollection('options', setSelectizeOptions);
    scope.$watch('ngModel', setSelectizeValue);
    scope.$watch('ngDisabled', toggle);
  };

suiteappdev avatar Aug 03 '16 22:08 suiteappdev