reload tree items after sorting is done
This commit is contained in:
@@ -2,6 +2,8 @@ import { UmbEntityActionBase } from '../../entity-action-base.js';
|
||||
import { UMB_SORT_CHILDREN_OF_MODAL } from './modal/index.js';
|
||||
import { UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal';
|
||||
import type { MetaEntityActionSortChildrenOfKind } from '@umbraco-cms/backoffice/extension-registry';
|
||||
import { UMB_ACTION_EVENT_CONTEXT } from '@umbraco-cms/backoffice/action';
|
||||
import { UmbRequestReloadTreeItemChildrenEvent } from '@umbraco-cms/backoffice/tree';
|
||||
|
||||
export class UmbSortChildrenOfEntityAction extends UmbEntityActionBase<MetaEntityActionSortChildrenOfKind> {
|
||||
async execute() {
|
||||
@@ -14,7 +16,17 @@ export class UmbSortChildrenOfEntityAction extends UmbEntityActionBase<MetaEntit
|
||||
treeRepositoryAlias: this.args.meta.treeRepositoryAlias,
|
||||
},
|
||||
});
|
||||
|
||||
await modal.onSubmit();
|
||||
|
||||
const eventContext = await this.getContext(UMB_ACTION_EVENT_CONTEXT);
|
||||
|
||||
eventContext.dispatchEvent(
|
||||
new UmbRequestReloadTreeItemChildrenEvent({
|
||||
unique: this.args.unique,
|
||||
entityType: this.args.entityType,
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user