mirror of
https://github.com/ankitects/anki.git
synced 2026-01-07 02:53:54 -05:00
Added: Close more menu on click
This commit is contained in:
parent
3c924c6694
commit
ed2ac660b4
2 changed files with 12 additions and 2 deletions
|
|
@ -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={() => {
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Reference in a new issue