Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(mat-form-field): mat-form-field inputs not rendering properly when deployed #21973

Closed
RobertWoehr opened this issue Feb 20, 2021 · 2 comments

Comments

@RobertWoehr
Copy link

RobertWoehr commented Feb 20, 2021

Reproduction

Steps to reproduce:

  1. Add form markup to template file using mat-form-field elements with input elements displaying the 4 different appearances.
  2. View app in browser.

https://stackblitz.com/edit/angular-ivy-gl3pev

Expected Behavior

What behavior were you expecting to see?

I expect the mat-form-fields of the deployed app to render exactly as they do when the app in run locally.

image

Actual Behavior

What behavior did you actually see?

The mat-form-fields render incorrectly on stackblitz:

image

Also render incorrectly when app is hosted in SharePoint Online on a Web Part Page using a Content Editor Web Part:

image

Another observation, textarea fields seem to render just fine in mat-form-field elements.

I followed this article to deploy angular apps to SharePoint Online:

https://www.c-sharpcorner.com/article/sharepoint-with-angular/

I'm fairly new to Angular and feel that a dependency was missed or misconfigured during deployment? Having said that, I merely copied & pasted the code of my simple example app to stackblitz & it doesn't render properly there either.

In SharePoint, sometimes I get a 404 error, but not always:

image

Environment

  • Angular: 10.0.14
  • CDK/Material: 10.2.7
  • Browser(s): Chrome 88.0.4324.182 (Official Build) (64-bit)
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 10

Angular CLI: 10.0.8
Node: 13.12.0
OS: win32 x64

Angular: 10.0.14
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package Version

@angular-devkit/architect 0.1000.8
@angular-devkit/build-angular 0.1000.8
@angular-devkit/build-optimizer 0.1000.8
@angular-devkit/build-webpack 0.1000.8
@angular-devkit/core 10.0.8
@angular-devkit/schematics 10.0.8
@angular/cdk 10.2.7
@angular/cli 10.0.8
@angular/material 10.2.7
@ngtools/webpack 10.0.8
@schematics/angular 10.0.8
@schematics/update 0.1000.8
rxjs 6.5.5
typescript 3.9.9
webpack 4.43.0

@RobertWoehr RobertWoehr added the needs triage This issue needs to be triaged by the team label Feb 20, 2021
@RobertWoehr RobertWoehr changed the title bug(COMPONENT): mat-form-fields not rendering properly when deployed bug(mat-form-field): mat-form-fields not rendering properly when deployed Feb 20, 2021
@RobertWoehr RobertWoehr changed the title bug(mat-form-field): mat-form-fields not rendering properly when deployed bug(mat-form-field): mat-form-field inputs not rendering properly when deployed Feb 20, 2021
@crisbeto
Copy link
Member

As far as I can tell, it's because you haven't included a theme. There's more information in the theming guide: https://material.angular.io/guide/theming

@crisbeto crisbeto added area: material/form-field and removed needs triage This issue needs to be triaged by the team labels Feb 22, 2021
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 25, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants