Material: Text disappears from md-autocomplete when focus is removed

Created on 23 Jun 2016  路  5Comments  路  Source: angular/material

I've a ng-repeat wrapper for md-autocomplete that looks like this:

<div>
    <md-input-container ng-repeat="param in paramlist" flex="85">
        <md-autocomplete md-selected-item="selectedItem"
                            md-search-text="searchText"
                            md-items="item in querySearch(searchText)"
                            md-selected-item-change="variableSelected(param, item)"
                            md-search-text-change="parameterChange(param, searchText)"
                            md-item-text="item"
                            md-floating-label={{param.displayname}}
                            md-no-cache="true">
            <span md-highlight-text="searchText">{{item}}</span>
        </md-autocomplete>
    </md-input-container>
</div>

It works good but I've one graphical problem:

http://g.recordit.co/auo8A3y7VQ.gif

When selecting an item from the md-autocomplete or entering text and then unfocus the md-autocomplete the text disappears. Anyone knows what I'm missing?

invalid

Most helpful comment

Closing this as it's not an issue. You are wrapping the autocomplete inside of an md-input-container, which is not valid.

All 5 comments

@PresidentCamacho Please provide a demo for your issue. Otherwise we wouldn't be able to recognize the issue.

Closing this as it's not an issue. You are wrapping the autocomplete inside of an md-input-container, which is not valid.

Are there any other scenario where this is invalid ?
I'm having the exact same problem Inside a md-dialog.

Remove <md-input-container> tag from your code. This will work fine to me.
Thanks

In case someone is having the same problem, try removing <md-input-container> tag.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

buzybee83 picture buzybee83  路  3Comments

chriseyhorn picture chriseyhorn  路  3Comments

Dona278 picture Dona278  路  3Comments

epelc picture epelc  路  3Comments

achaussende picture achaussende  路  3Comments