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

Conditional Elasticity #29

Open
f-aubert opened this issue Sep 7, 2017 · 0 comments
Open

Conditional Elasticity #29

f-aubert opened this issue Sep 7, 2017 · 0 comments

Comments

@f-aubert
Copy link

f-aubert commented Sep 7, 2017

Hello, I'm quite new using angular 4, and ng-elastic. So please forgive me if my issue is inappropriate. First let me thank you for your very valuable directive, which makes textarea comfortable to use.

Would you consider providing us hook to conditionally apply your directive, as as far as I know it is not doable in angular itself.

  • One improvement would be to allow textarea to resize only when focused, it is implementable adding focus and blur HostListeners, as well as checking the focus state (document.activeElement === this.textAreaEl) before either adjusting or reverting the height to 'auto'. Maybe an additional directive Input attribute could trigger this behavior, or a subclassed directive 'EllasticOnFocus'
  • Another improvement would be to allow enabling/disabling textarea ability to resize. Events would hence check the enabled state, and either adjust or revert the height to 'auto'. An additional directive Input could trigger this behavior, allowing developer to provide for example a '+' button to toggle the textarea elasticity on or off.

At the very least, would you consider making the fields and methods protected instead of private, so we could implements custom directive by subclassing your directive with my own?

I would gladly assist you in implementation and/or testing, at the best of my angular / html event knowledge...

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