Questions tagged [mat-dialog]
145 questions
0
votes
1 answer
Angular 16 / Material Dialog title height LARGE when having component inside
After migrating to Angular 16 and Material MDC components we have a trouble with dialog titles that contain an element. It adds incredible amount of space to the top.

PeS
- 3,757
- 3
- 40
- 51
0
votes
0 answers
Angular Component automatically scrolls to middle when opened as MAT_DIALOG
I have an angular website, where pages can be opened under specific routes, but I also can (by clicking on specific buttons) open these pages as dialog. When I open these pages as dialogs, the dialog automatically starts at the middle/bottom of the…

Jacob Heldt
- 1
- 2
0
votes
1 answer
Add a universal property to the MatDialog
I want to add the property disableClose with the value true to all MatDialogs in my Angular app.
I've searched already and tried to set the property disableClose in the app.module.ts file. But that didn't work.
Anyone have an idea?

Stefan B.
- 33
- 5
0
votes
0 answers
How can I keep open my mat dialogue modal if Angular route getting change in Angular Material?
I am implementing the multiple dialogue modal functionality to open multiple dialogue at a time and not closed until we closed manually.
Expected Behaviour: In this feature we allow user to open modal on
click of navigation bar and it is draggable…

Nisar Saiyed
- 728
- 1
- 8
- 17
0
votes
0 answers
Mock Component used in MatDialog
I have two libraries/modules with one component Each.
One Component (MainComponent) uses the other (DialogComponent) in a MatDialog open Statement.
The DialogComponent uses a Service (PermissionsServie) that uses MsalModule.
When i mock and provide…

Andresch Serj
- 35,217
- 15
- 59
- 101
0
votes
1 answer
Angular mat dialog not showing correctly
I am trying to create a dialog that shows up when a button is clicked. The problem now is that when the button is clicked, the dialog shows up as plain text in the left bottom corner of the screen. The background is also white and the web page is…

John
- 97
- 1
- 7
0
votes
1 answer
Angular dialog popup disables background access
I have been looking for a little while, but it seems like there isn't a way to keep an angular dialog open while still being able to access the background site and not have it disabled. Look at my example image. I don't see a way to pass in some…

coloradoman
- 341
- 1
- 5
- 11
0
votes
1 answer
Angular parent mat dialog component is changed from a child mat dialog component
I am openening a mat dialog for creating some object. In this mat dialog i can preview some data by clicking "preview" button, and then opens child mat dialog from my parent dialog, where i passing an object for a preview. The problem is that this…

Brave Spirit
- 1
- 3
0
votes
1 answer
Closing Angular Material Dialog returns false but is evaluated as true?
I close a MatDialog with true and false, but somehow I cannot retrieve these boolean values in the correct way. See my code below. The shouldRefresh method should not be called, and yet it is.
dialogRef.afterClosed()
.subscribe((result:…

Ch Ryder
- 360
- 3
- 10
0
votes
1 answer
NullInjectorError: No provider for InjectionToken MatDialogData! - when mocking dialog component in jasmine
I have generated test case for dialog component using simontest extension in visual studio code. But i get the following error leading to the failure of spec.
Dialog Component
import { ComponentFixture, TestBed } from '@angular/core/testing';
import…

Shobana VK
- 359
- 2
- 3
- 10
0
votes
1 answer
Angular dialog open causes query parameters being removed on newly loaded page
I think it has something to do with how the dialog is injected so it does not know about the component tree or the routing. Which I say it's good thing if it's the case.
But it's strange the URL (query parameters bit) changes after opening…

Hao
- 6,291
- 9
- 39
- 88
0
votes
1 answer
Angular 14 - How to break two way binding on formgroups inside formarray for mat-dialog?
My problem is detailed lower down. I have a mat-dialog that is used to edit a previous data entry. Each entry has a FormGroup in the form of a Deliverable. So a FormControl name, and a FormArray Steps. Then the FormArray Steps has a FormGroup with…

noname
- 95
- 6
0
votes
1 answer
Material Dialog - update configuration (hasBackdrop) after open
It is possible to update the MatDialog configuration after open? I am trying to set the backdrop to true when the Dialog is opened and to false after some operations.
openDialog() {
const config = new MatDialogConfig();
config.hasBackdrop =…

Mat
- 113
- 6
0
votes
0 answers
Mat Dialog boxes close button and overlay is not working on iphone 8plus and lower versions
iam using angular material for dialog boxes and popups,but when i tested the website in iphone 8 and 8plus iam not able to close dialog box and the background overlay also not available.
this is my package.json file configuration
…

sinan
- 133
- 8
0
votes
1 answer
Mat Dialog result ""
Once i input the number and select the add, It will pop-up the dialog and input any animals. but once i submit it, i got the result is "", but once i push the animals with this code this.data.totalCount it works. can someone help me and tried to fix…

Mitch
- 3
- 3