How to hide underline when disabled in mat-select angular


How to hide underline when disabled in mat-select angular



In this page https://material.angular.io/components/select/overview , in "Disabling the select or individual options", the mat-select looks like this when is disabled:



mat-select



So I want to hide that pointed underline.



I tried a few solutions found here but none of those helped me.





.mat-form-field-disabled .mat-form-field-underline { background: none !important; } ???
– Eliseo
Jul 2 at 21:14





@Eliseo doesn't work.
– Facundo Yuffrida
Jul 3 at 17:35




1 Answer
1



Add this CSS code to your component :


:host /deep/ .mat-form-field-disabled .mat-form-field-underline {
background-image: none !important;
}






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

api-platform.com Unable to generate an IRI for the item of type

How to set up datasource with Spring for HikariCP?

Display dokan vendor name on Woocommerce single product pages