-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
md-textarea #546
Comments
@hansl did you have any existing plans WRT I'm thinking it might be good to have a The autosize would be a good follow-up. It would be good to see a simple proof-of-concept on the |
You can see it here https://stevepapa.com/angular2-autosize/ |
@jelbourn can this be added to Alpha.6 milestone? |
not sure I follow, you want to use React to do undo redo? why would a textarea even need an undo redo, you can do cmd + z, cmd + shift + z? |
Textarea in general, when you continuously type-in, and then do a |
That doesn't really have to do anything with either native textareas or material spec though. Maybe some |
Aleš I was also wondering what Sendil actually mean by having undo/redo for textarea, but after his recent comment, I revisited the textarea example on react site, and I think could be a really useful feature especially in cases where we have to type in long text. The Github textarea where we type in the comments also have similar functionality, although its a richtext area. |
@fxck Feel free to send a PR; we don't have the work scheduled for alpha.6 or 7 right now |
@jelbourn should I go with that |
@fxck I would lean towards taking the base class approach; I'm thinking that will end up being cleaner / easier to split up. |
We would love that! |
@jelbourn hi, which stage is this feature in? I see PRs and the issue is closed but on the homepage it is |
It's in master, but not released on npm. |
I see it's on npm but how to auto-size md-textarea ? Adding attribute md-autosize isn't working for me... |
@binarious thanks, but I already solved this issue and with the help of this demo app. Wrapping in md-input-container and etc fixed it. |
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. |
I would like to add
md-textarea
. From what I've tried(c&p md-input code, changing selector and template), it should be pretty straightforward, as it just worked without any changes to style or the component itself.The differences between input and textarea are
type
,step
,list
attributesSince 90% of the component is made of annotations, and those cannot be inherited, the way to go(I think) might be either to extend selector
and use
ElementRef
to check which selector matched(unless there's a better way I don't know of) and*ngIf
the template to either<input>
or<textarea>
.or keep only one selector(that is
md-input
), and addmd-textarea
as attribute, and*ngIf
the template depending on that.In both cases I'd be needed add check that
type
was not added along<md-textarea>
ormd-textarea
, because of_convertValueForInputType
, there won't be no need to do anything withstep
orlist
, since those simply won't be on the*ngIf
'd template.Thoughts?
as for autosize, there's this tiny thing https://github.com/stevepapa/angular2-autosize
which utilizes
scrollHeight
, which is apparently supported by most browsers https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeightThe text was updated successfully, but these errors were encountered: