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(form-field): Default options not applied in dialog #30275

Open
1 task
martinboue opened this issue Jan 6, 2025 · 0 comments
Open
1 task

bug(form-field): Default options not applied in dialog #30275

martinboue opened this issue Jan 6, 2025 · 0 comments
Labels
needs triage This issue needs to be triaged by the team

Comments

@martinboue
Copy link

martinboue commented Jan 6, 2025

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

MAT_FORM_FIELD_DEFAULT_OPTIONS do not apply to form-field inside material dialog component.

Reproduction

in root app.component.ts:

@Component({
	...
	providers: [
		{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { appearance: 'outline' } }
	]
})
export class AppComponent { ... }

in dialog.component.html:

<h2 mat-dialog-title i18n>My title</h2>
<mat-dialog-content>
	<mat-form-field>
		<mat-label>Some field</mat-label>
		<input matInput type="text">
	</mat-form-field>
</mat-dialog-content>

dialog.component is opened using this.dialog.open(DialogComponent)

Expected Behavior

Outline appearance
Image

Actual Behavior

Fill appearance
Image

Environment

  • Angular: v19
  • CDK/Material: v19
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows
@martinboue martinboue added the needs triage This issue needs to be triaged by the team label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This issue needs to be triaged by the team
Projects
None yet
Development

No branches or pull requests

1 participant