Close all active modals when home shortcut is used
Signed-off-by: Heiko Carrasco <heiko.carrasco@yahoo.com>
This commit is contained in:
parent
f36651f538
commit
d7f15985f5
2 changed files with 11 additions and 0 deletions
|
@ -147,6 +147,15 @@ export class ModalManager {
|
|||
return this.appendDialogAsync<T>(...rest);
|
||||
}
|
||||
|
||||
public closeCurrentModal(reason: string) {
|
||||
const modal = this.getCurrentModal();
|
||||
if (!modal) {
|
||||
return;
|
||||
}
|
||||
modal.closeReason = reason;
|
||||
modal.close();
|
||||
}
|
||||
|
||||
private buildModal<T extends any[]>(
|
||||
prom: Promise<React.ComponentType>,
|
||||
props?: IProps<T>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue