Added: Close more menu on click

This commit is contained in:
Luc Mcgrady 2025-11-17 14:02:19 +00:00
parent 3c924c6694
commit ed2ac660b4
No known key found for this signature in database
GPG key ID: 4F3D7A0B17CC3D9C
2 changed files with 12 additions and 2 deletions

View file

@ -139,7 +139,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
/>
{/each}
<MoreSubmenu bind:showFloating>
<MoreSubmenu bind:showFloating bind:lockOpen={showFlags}>
<button
slot="button"
on:click={() => {

View file

@ -7,10 +7,20 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import WithFloating from "$lib/components/WithFloating.svelte";
export let showFloating = false;
export let lockOpen = false;
</script>
<div>
<WithFloating show={showFloating} inline on:close={() => (showFloating = false)}>
<WithFloating
show={showFloating}
inline
on:close={() => {
if (!lockOpen) {
showFloating = false;
}
}}
closeOnInsideClick
>
<slot slot="reference" name="button"></slot>
<Popover slot="floating">