md-select does not show title/description/placeholder
Bug, feature request, or proposal:
I use the md-select component. Unfortunatelly,, the placeholer is not captioned when the component is loaded. It's only shown when an item is selected.
What is the expected behavior?
When the following example is loaded, I expect to see the caption "Favorite food" above the component see here: https://material.angular.io/components/select/examples
What is the current behavior?
see here: https://material.angular.io/components/select/examples
What are the steps to reproduce?
see description above
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Material 2.0.0-beta.8
I can see the placeholder perfectly fine on the examples page.
@pjmagee I think @ceverke confuses placeholders with labels. 'Favorite food' is a placeholder.
I'm sorry for confusing. After an item is selected, then "Favorite food" can be read in small letters above the component (as some kind of label). But in my case it's desired to have the small caption (label) of the component already after loading the page (before an item is selected).
(or is it a feature of the component because otherweise the placeholder would be displayed twice??)
This behaviour is described in the material design guidelines
- Labels/placeholder rest above the line when the text field is empty.
- Labels/placeholder float upward when the text field is in focus or filled.
But you can use the option floatPlaceholder="always" of md-form-field for your needs.
<md-form-field floatPlaceholder="always">
<input mdInput #testInput placeholder="Name">
</md-form-field>
OK, sorry... didn't realy read about it... sorry
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.