Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get focus? #149

Open
suiteappdev opened this issue Aug 3, 2016 · 0 comments
Open

how to get focus? #149

suiteappdev opened this issue Aug 3, 2016 · 0 comments

Comments

@suiteappdev
Copy link

suiteappdev commented Aug 3, 2016

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);
  };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant