:+1:
@robertmesserle why not shift md-autocomplete from being a directive to being an attribute that can be tacked onto input and textarea tags instead of keeping it as a separate directive?
That's a possibility, but more thought will have to be given as it's not
quite as cut-and-dry as that. If that makes the most sense, that's
probably the direction it'll end up going.
On Mon, Mar 16, 2015 at 9:57 AM, Ilan Biala [email protected]
wrote:
@robertmesserle https://github.com/robertmesserle why not shift
md-autocomplete from being a directive to being an attribute that can be
tacked onto input and textarea tags instead of keeping it as a separate
directive?—
Reply to this email directly or view it on GitHub
https://github.com/angular/material/issues/1669#issuecomment-81804622.
@robertmesserle can you list the pros and cons so we can possibly brainstorm ideas and solutions for this?
@ilanbiala Sure. I am working on other features right now, so this change will not be happening immediately. This will likely depend on what call we make regarding #1706 - if we opt to allow more involved styling of the selected item, then it will not make sense to hold within an input.
@ilanbiala I just added support to the autocomplete for standard input styling. Demo can be seen here: https://material.angularjs.org/#/demo/material.components.autocomplete
Syntactically, this is the same as the normal md-autocomplete component; however, internally, it leverages md-input-container for its floating label functionality.
Please, explain how can I build my html? Because it doesn't work as on Demo here
Thanks!
@robertmesserle what is the change in syntax that makes it look like a regular input? Why not just let me do it on any input/textarea with attributes?
@ilanbiala I mocked up proposed syntaxes for allowing autocomplete to be added directly to existing inputs; however, it ended up being less obvious what was going on that way. It's still not completely off the table, but so far, it's seemed more obvious with the existing syntax, as seen here in the second demo:
https://material.angularjs.org/#/demo/material.components.autocomplete
In case you wanted to see some related notes, here's a gist where I was brainstorming syntax options for supporting ngMessages:
Is there a way to have an autocomplete field behave like a textarea (i.e. multiple lines?)
Do we have textarea autocomplete feature in angular material ?
Above links provided by @robertmesserle is not pointing to the right source I believe.
Most helpful comment
Is there a way to have an autocomplete field behave like a textarea (i.e. multiple lines?)