indrimuska / angular-selector

A native AngularJS directive that transform a simple <select> box into a full html select with typeahead.
http://indrimuska.github.io/angular-selector
MIT License
96 stars 36 forks source link

Always leave dropdown list open #67

Closed stephanebruckert closed 7 years ago

stephanebruckert commented 7 years ago

Hi,

I would like to keep the dropdown open all the time.

I'm already adding the focus on load, and I added a directive to prevent the dropdown list from closing when the selector looses focus.

.directive('input', function() {
  return {
    link: function (scope, element, attrs) {
      element.bind('blur', function (e) {
        scope.myAPI.focus();
      });
    }
  };
});

@indrimuska, would you be happy to see a PR that incorporates that feature inside angular-selector?

Thanks

indrimuska commented 7 years ago

Thank you @stephanebruckert for proposing this! I think that this is an application level feature, what if I have about 10 selector in the same page? I don't want all of them to open at startup at the same time, so it's better to let users choose what to do in this case.

Anyway, thank you for spending your time in this project 👍