Merge pull request #1347 from umbraco/bugfix/keep-entity-action-dialog-open
Bugfix: Keep entity action dialog open under action flow
This commit is contained in:
@@ -8,10 +8,12 @@ export class UmbCreateDataTypeEntityAction extends UmbEntityActionBase<UmbDataTy
|
||||
if (!this.repository) throw new Error('Repository is not available');
|
||||
|
||||
const modalManager = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
|
||||
modalManager.open(this, UMB_DATA_TYPE_CREATE_OPTIONS_MODAL, {
|
||||
const modalContext = modalManager.open(this, UMB_DATA_TYPE_CREATE_OPTIONS_MODAL, {
|
||||
data: {
|
||||
parentUnique: this.unique,
|
||||
},
|
||||
});
|
||||
|
||||
await modalContext.onSubmit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,11 +8,13 @@ export class UmbCreateDataTypeEntityAction extends UmbEntityActionBase<UmbDocume
|
||||
if (!this.repository) throw new Error('Repository is not available');
|
||||
|
||||
const modalManager = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
|
||||
modalManager.open(this, UMB_DOCUMENT_TYPE_CREATE_OPTIONS_MODAL, {
|
||||
const modalContext = modalManager.open(this, UMB_DOCUMENT_TYPE_CREATE_OPTIONS_MODAL, {
|
||||
data: {
|
||||
parentUnique: this.unique,
|
||||
entityType: this.entityType,
|
||||
},
|
||||
});
|
||||
|
||||
await modalContext.onSubmit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ export class UmbDataTypeCreateOptionsModalElement extends UmbModalBaseElement<Um
|
||||
|
||||
// close the modal when navigating to data type
|
||||
#onNavigate() {
|
||||
this._rejectModal();
|
||||
this._submitModal();
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
@@ -28,11 +28,13 @@ export class UmbCreateDocumentEntityAction extends UmbEntityActionBase<UmbDocume
|
||||
}
|
||||
|
||||
const modalManager = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
|
||||
modalManager.open(this, UMB_DOCUMENT_CREATE_OPTIONS_MODAL, {
|
||||
const modalContext = modalManager.open(this, UMB_DOCUMENT_CREATE_OPTIONS_MODAL, {
|
||||
data: {
|
||||
document: documentItem ? { unique: documentItem.unique } : null,
|
||||
documentType: documentItem ? { unique: documentItem.documentType.unique } : null,
|
||||
},
|
||||
});
|
||||
|
||||
await modalContext.onSubmit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,10 +8,12 @@ export class UmbCreateMediaTypeEntityAction extends UmbEntityActionBase<UmbMedia
|
||||
if (!this.repository) throw new Error('Repository is not available');
|
||||
|
||||
const modalManager = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
|
||||
modalManager.open(this, UMB_MEDIA_TYPE_CREATE_OPTIONS_MODAL, {
|
||||
const modalContext = modalManager.open(this, UMB_MEDIA_TYPE_CREATE_OPTIONS_MODAL, {
|
||||
data: {
|
||||
parentKey: this.unique,
|
||||
},
|
||||
});
|
||||
|
||||
await modalContext.onSubmit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,8 +36,10 @@ export class UmbCreateMediaEntityAction extends UmbEntityActionBase<UmbMediaDeta
|
||||
|
||||
private async _openModal(modalData: UmbMediaCreateOptionsModalData) {
|
||||
const modalManager = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
|
||||
modalManager.open(this, UMB_MEDIA_CREATE_OPTIONS_MODAL, {
|
||||
const modalContext = modalManager.open(this, UMB_MEDIA_CREATE_OPTIONS_MODAL, {
|
||||
data: modalData,
|
||||
});
|
||||
|
||||
await modalContext.onSubmit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,11 +7,13 @@ export class UmbPartialViewCreateOptionsEntityAction extends UmbEntityActionBase
|
||||
if (!this.repository) throw new Error('Repository is not available');
|
||||
|
||||
const modalManager = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
|
||||
modalManager.open(this, UMB_PARTIAL_VIEW_CREATE_OPTIONS_MODAL, {
|
||||
const modalContext = modalManager.open(this, UMB_PARTIAL_VIEW_CREATE_OPTIONS_MODAL, {
|
||||
data: {
|
||||
parentUnique: this.unique,
|
||||
entityType: this.entityType,
|
||||
},
|
||||
});
|
||||
|
||||
await modalContext.onSubmit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,11 +7,13 @@ export class UmbScriptCreateOptionsEntityAction extends UmbEntityActionBase<neve
|
||||
if (!this.repository) throw new Error('Repository is not available');
|
||||
|
||||
const modalManager = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
|
||||
modalManager.open(this, UMB_SCRIPT_CREATE_OPTIONS_MODAL, {
|
||||
const modalContext = modalManager.open(this, UMB_SCRIPT_CREATE_OPTIONS_MODAL, {
|
||||
data: {
|
||||
parentUnique: this.unique,
|
||||
entityType: this.entityType,
|
||||
},
|
||||
});
|
||||
|
||||
await modalContext.onSubmit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,11 +7,13 @@ export class UmbStylesheetCreateOptionsEntityAction extends UmbEntityActionBase<
|
||||
if (!this.repository) throw new Error('Repository is not available');
|
||||
|
||||
const modalManager = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
|
||||
modalManager.open(this, UMB_STYLESHEET_CREATE_OPTIONS_MODAL, {
|
||||
const modalContext = modalManager.open(this, UMB_STYLESHEET_CREATE_OPTIONS_MODAL, {
|
||||
data: {
|
||||
parentUnique: this.unique,
|
||||
entityType: this.entityType,
|
||||
},
|
||||
});
|
||||
|
||||
await modalContext.onSubmit();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user