Open shabbir-dhangot opened 7 years ago
If you do something like that (commented on #247) you will always get a result of null
. This is caused because you are not opening a confirm dialog. I am exactly in the same problem. I would like to get some result from a non confirm modal.
openCustom() {
const dialog = this.modal.open(AdditionCalculateWindow, new AdditionCalculateWindowData(2, 3));
dialog.then(resultPromise => {
return resultPromise.result
.then(
result => console.log('result', result),
() => console.log('Rejected')
);
});
}
Hi.. Anybody has got any solution for this ? please help.
@shivanand23 yes! please see a very easy solution here: #320
@alfupe Thank you so much Alex. It works like a dream.
Also in case user clicks outside the modal or presses the escape key and exists the modal I used the beforeDismiss() override.
beforeDismiss(): boolean { this.dialog.close("result to pass"); return false; }
@shivanand23 yeah! I'm glad to see that! ;-)
this.dialog.close() This doesn't work for me
Hi I wish to know about the feature of close dialog listener or event. How Can I come to know the custom-model is closed.
I am calling custom model like below.
openCustom() { this.modal.open(AdditionCalculateWindow, new AdditionCalculateWindowData(2, 3)); }
Now I want to know when dialog gets close. Please let me know How can I do that. I need to reset some data.