ng2-ui / auto-complete

Angular Auto Complete component and directive
https://ng2-ui.github.io/dist/#/auto-complete
MIT License
279 stars 123 forks source link

New property to make auto focus behavior more configurable #288

Closed igorrius closed 6 years ago

igorrius commented 6 years ago

Hello! Please see my PR. I had use a new property to make auto focus behavior more configurable. Thanks!

allenhwkim commented 6 years ago

I think we are having too many options. Can you think other way without introducing a new option?

igorrius commented 6 years ago

Maybe you are right, but many option gives us more flexible behavior. So, I promise will think about your propose. Thanks!)

troolee commented 6 years ago

I don't thing this is a good solution. As for me, auto-focus should still work when user selects a value.

igorrius commented 6 years ago

I don't thing this is a good solution. As for me, auto-focus should still work when user selects a value.

If you using two components in one form and you change focus between that, first component still be focused. Exactly this problem I was trying to fix.

arthursp commented 6 years ago

Could you please merge to master ? This feature is a requirement, as igorrius said, for example i am using it in ionic, and ionic allready set the focus on inputs ...

arthursp commented 6 years ago

Could you also publish the npm module with a new version ?

gilles-g commented 6 years ago

Hi, I think this is strange to have the attribute re-focus-after-select on true by default...now I need to pass on all my directives to add this attribute on false. But thanks to propose a fix.

matteobaldelli commented 6 years ago

Why was it implemented only in directive and not in component??