-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
feat(textarea): add md-autosize directive #1846
Conversation
Yeah, LGTM. How about throwing an error when you try to use both autosize and rows? |
@Input() minRows: number; | ||
|
||
/** Maximum number of rows for this textarea. */ | ||
@Input() maxRows: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you also do an @input() for value so you can resize when the content is changed programmatically?
textareaClone.style.visibility = 'hidden'; | ||
textareaClone.style.padding = ''; | ||
textareaClone.style.minHeight = ''; | ||
textareaClone.style.height = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also clear maxHeight and border
@@ -19,10 +19,24 @@ export class MdTextareaAutosize implements OnInit { | |||
/** Maximum number of rows for this textarea. */ | |||
@Input() maxRows: number; | |||
|
|||
/** The value of the textarea. */ | |||
private _value: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this our team's official style for these getter/setters? If it's still up for debate, I prefer:
/** ... */
@Input()
get value() {...}
set value(v) {...}
private _value;
It's a good reminder that I should be accessing it through the getter unless I have a good reason not to.
whoops, didn't notice this was still wip |
lgtm |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
R: @mmalerba
CC: @fxck