Bugfix: Collection View menu close

Hides the popover when an option is selected.

Fixes https://github.com/umbraco/Umbraco-CMS/issues/16273
This commit is contained in:
leekelleher
2024-07-08 10:37:05 +01:00
parent 028ed87b68
commit fff1be3ba6

View File

@@ -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;
}
`,
];
}