question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Placeholder doesn't appear in mat-select, select box

See original GitHub issue

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Placeholder to appear

What is the current behavior?

Placeholder doesn’t appear

What are the steps to reproduce?

I’ve just added this code and the placeholder doesn’t ppear after the mat prefix update

<mat-select placeholder="Favorite food">
            <mat-option [value]="0">
              TOMATO
            </mat-option>
</mat-select>

What is the use-case or motivation for changing an existing behavior?

rolling back to the old md prefox

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

LATEST

Is there anything else we should know?

No

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
benb7760commented, Oct 13, 2017

@JosephSKh A lot of people are having issues with caching - myself included. I’ve been browsing it in incognito mode

1reaction
benb7760commented, Oct 13, 2017

mat-select must appear inside a mat-form-field since beta12

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I always display the placeholder in mat-select ...
The current behavior is: A soon as a language is selected, the placeholder is made small, moved to the top and the selected...
Read more >
Input and select placeholders are not correctly placed #7841
In short, when you perform a transform on the mat-select, the placeholder doesn't stay attached to the box...
Read more >
Select | Angular Material
Function to compare the option values with the selected values. The first argument is a ... Placeholder to be shown if no value...
Read more >
:placeholder-shown - CSS: Cascading Style Sheets | MDN
The :placeholder-shown CSS pseudo-class represents any <input> or <textarea> element that is currently displaying placeholder text.
Read more >
ngx-mat-select-search - npm
The currently selected option might be hidden under the search input field when opening the options panel and the panel is at the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found