Questions tagged [material-dialog]
53 questions
1
vote
1 answer
Dialog opened by custom ErrorHandler provider in response to async event does not close
I have a general Alert Dialog component that I use for various purposes throughout an Angular application (simplified)...
@Component({
selector: 'app-alert-dialog',
template:…

Nickolas Hook
- 774
- 5
- 13
1
vote
0 answers
Initializing Angular reactive form with data - form data not displaying
I am trying to initialize a form in a mat-dialog with data from an interface in my datasource, however the data is not showing up in the form fields. The data is correctly passing through as it is showing up in the html of the dialog, just not the…

Nomee
- 21
- 3
1
vote
1 answer
I have a Angular material Menu inside a Material Dialog. On pressing ESC, Menu and Dialog both are closed. How to prevent dialog to not close on ESC?
I have a mat menu inside mat dialog. After opening dialog and then menu inside it, i pressed esc to close the menu, but both menu and dialog are closed. How to close just the menu and not the dialog with ESC?
It can be reproduced…
1
vote
0 answers
Angular Material dialog box not rendered correctly
My angular material dialog box was working just fine before I updated the packages with latest version 10. I don't know what I'm missing in my dependencies or code.
It might be related with new Angular compiler Ivy or Angular material library.
Here…

Dhiraj Jain
- 11
- 2
1
vote
1 answer
Multiple dialog boxes, for loop, opening - angular 7 + angular material
I have situation where I get from API String array of validation codes.
Also I have mapper where I get description to code on front side.
Question is, there is possible to display material dialog after closing previous one?
My code:…

Uland Nimblehoof
- 862
- 17
- 38
1
vote
0 answers
Material Dialogs manage multiple dialogs z-index
I have an application with multiple Angular Material dialogues opened at the same time with a drag and drop feature. What I want is when I click a modal it should be placed in front, is there a way to do that using Angular Material or at least a CSS…

E . Younes
- 37
- 10
1
vote
0 answers
How to mock component instance event
I want to test an event (dialogEvent) which is being triggered from a material dialog instance with ts-mockito:
myFunc() {
this.matDialogRef = this.matDialog.open(DialogComponent);
…

DonJuwe
- 4,477
- 3
- 34
- 59
1
vote
1 answer
Using Component as dialog ref but not always
So I have a component which is sometimes used as a dialog ref and sometimes used normally outside of a dialog.
For example:
A form with a yes or no answer
Now sometimes I render this component inside a chat component (which is not a dialog) and…

Gabb1995
- 977
- 10
- 18
0
votes
0 answers
Unable to click on button once dialog is opened and closed in React JS Material UI
In my react I have two components in one component I have a table with action button delete and edit
Steps where I producing issue:
when I click on delete button I am opening a dialog showing with some text
Next when click on close button or delete…

jallipalli phanindra
- 11
- 1
0
votes
1 answer
How to override Material UI theme if we have 2 dialog boxes with different properties?
I am using Nextjs with Material UI. I have 2 dialog boxes with different styles but I don't know how to override theme for both by using createTheme.
First dialog box have width 200px and the second one have 500px. If I overrride dialog width to…

coder
- 1
- 1
0
votes
0 answers
Angular: dynamically create componet from route url
I am using Angular 6 in my application.
After calling a Web Api I compose an Angular route Url, for example /module-name/component-name/par1Value/par2Value/par3Value.
I now want to show the component from the read route in a Material Dialog.
How can…

ExpRick
- 13
- 2
0
votes
0 answers
MaterialAlertDialog shifts text after showing dialog
When I present a MaterialAlertDialog, the text is shifted to expand to the available space, after the dialog is shown.
How do I prevent this from happening (i.e. the text should be static once the dialog is shown)?
Here is a video of what it looks…

shko
- 64
- 2
- 20
0
votes
0 answers
Angular dialogs: intercept closing through ESC
When opening a dialog with the following code
this.dialog.open(MyComponent, {
...
disableClose: false,
...
});
a dialog will be opened as we expect and when pressing ESC, that dialog is then closed. This behaviour is fine…

Wouter V
- 1
- 1
0
votes
0 answers
Angular Material Dialog with Parent window diabled
In my angular application I want to open a Matdialog on click of a button and when the dialog is open, the parent window should be DISABLED (Not editable).
I see most of the examples where parent window is editable.
Is there a way we can disable…

user1015388
- 1,283
- 4
- 25
- 45
0
votes
1 answer
google.maps.places.Autocomplete position offset inside angular material Dialog
I'm using a google autocomplete input inside angular material Dialog.
When the user scrolls a bit down, material Dialog uses a trick and (according to source):
/** Blocks page-level scroll while the attached overlay is open .
This in turn adds a…

Eli
- 1,670
- 1
- 20
- 23