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.

mat-select not giving underline and placeholder

See original GitHub issue

Bug, feature request, or proposal:

Underline for the dropdown is not rendering and placeholder value is not displaying, please see the code below


<mat-select *ngIf="someCheck" 
  (ngModelChange)="updateonchange()" 
  [(ngModel)]="selectedvalue">
   <mat-option>
          Test
   </mat-option>
   <mat-option>
          Test1
   </mat-option>
</mat-select>

What is the expected behavior?

It was working fine with md-select, after the updating to the latest release, I am having this issue

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

@angular/material”: “^5.0.0-rc0”, “@angular/animations”: “^5.0.1”, “@angular/cli”: “^1.5.0”, “typescript”: “^2.6.1”

using Ubuntu and Google Chrome

Is there anything else we should know?

Please check the screen shot nounderline

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
kaziupircommented, Nov 16, 2017

You should update examples on https://material.angular.io

0reactions
angular-automatic-lock-bot[bot]commented, Sep 7, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to remove underline of mat-select component
Use css hierarchy. If you have a global css or scss file... then in the component, wrap this in a div and give...
Read more >
material theming SCSS - Apigee Docs
This makes centering the overlay easy without running into the subpixel rendering ... css rules to an element to give it the elevation...
Read more >
Form field - Angular Material
<mat-form-field> is a component used to wrap several Angular Material components and apply common Text field styles such as the underline, floating label, ......
Read more >
An Introduction to Angular Material Form-Fields - Medium
This format shows components with an underline and when data has been entered the placeholder (in this case Name) becomes a floating label....
Read more >
Angular Material (MAT) Form-Field - Javatpoint
It shows the <mat-form--field> with a border all the way around, not just an underline. Example 2: Form-field appearance variants. import {Component} from...
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