Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • ivan valadares 9 posts 129 karma points
    1 week ago
    ivan valadares
    0

    Refresh Media Tree ?

    How to Refresh the Media Tree in Umbraco 14?

    I need to refresh the Media Tree programmatically in Umbraco 14. The call is being made from a web component.

    Thanks in advance for your help!

  • ivan valadares 9 posts 129 karma points
    1 week ago
    ivan valadares
    100
    import { UMB_ACTION_EVENT_CONTEXT } from '@umbraco-cms/backoffice/action';
    import { UmbRequestReloadStructureForEntityEvent } from '@umbraco-cms/backoffice/entity-action';
    
    const actionEventContext = await this.getContext(UMB_ACTION_EVENT_CONTEXT);
    const event = new UmbRequestReloadStructureForEntityEvent({
                        unique: this.#unique!,
                        entityType: 'media',
                    });
    actionEventContext.dispatchEvent(event);
    
Please Sign in or register to post replies

Write your reply to:

Draft