mirror of
https://github.com/ankitects/anki.git
synced 2026-01-09 03:53:55 -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}
|
{/each}
|
||||||
|
|
||||||
<MoreSubmenu bind:showFloating>
|
<MoreSubmenu bind:showFloating bind:lockOpen={showFlags}>
|
||||||
<button
|
<button
|
||||||
slot="button"
|
slot="button"
|
||||||
on:click={() => {
|
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";
|
import WithFloating from "$lib/components/WithFloating.svelte";
|
||||||
|
|
||||||
export let showFloating = false;
|
export let showFloating = false;
|
||||||
|
export let lockOpen = false;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div>
|
<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>
|
<slot slot="reference" name="button"></slot>
|
||||||
|
|
||||||
<Popover slot="floating">
|
<Popover slot="floating">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue