From fff1be3ba696eaaeb88c6b751cb053bf1bb043cf Mon Sep 17 00:00:00 2001 From: leekelleher Date: Mon, 8 Jul 2024 10:37:05 +0100 Subject: [PATCH] Bugfix: Collection View menu close Hides the popover when an option is selected. Fixes https://github.com/umbraco/Umbraco-CMS/issues/16273 --- .../components/collection-view-bundle.element.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/collection/components/collection-view-bundle.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/collection/components/collection-view-bundle.element.ts index 0d09882d0a..9936840c15 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/collection/components/collection-view-bundle.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/collection/components/collection-view-bundle.element.ts @@ -110,6 +110,13 @@ export class UmbCollectionViewBundleElement extends UmbLitElement { #onClick(view: UmbCollectionViewLayout) { this.#collectionContext?.setLastSelectedView(this._entityUnique, view.alias); + + setTimeout(() => { + // TODO: This ignorer is just neede for JSON SCHEMA TO WORK, As its not updated with latest TS jet. + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + this._popover?.hidePopover(); + }, 100); } override render() { @@ -151,15 +158,12 @@ export class UmbCollectionViewBundleElement extends UmbLitElement { css` :host { --uui-button-content-align: left; + --uui-menu-item-flat-structure: 1; } .filter-dropdown { padding: var(--uui-size-space-3); } - - umb-icon { - display: inline-block; - } `, ]; }