mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
fix(toolbar-menu): remove redundant menu offset for Svelte 5 compatibility (#2047)
Fixes #2040
This commit is contained in:
parent
99ba6f3db9
commit
7e173943ac
1 changed files with 2 additions and 3 deletions
|
@ -5,12 +5,11 @@
|
||||||
import Settings from "../icons/Settings.svelte";
|
import Settings from "../icons/Settings.svelte";
|
||||||
import OverflowMenu from "../OverflowMenu/OverflowMenu.svelte";
|
import OverflowMenu from "../OverflowMenu/OverflowMenu.svelte";
|
||||||
|
|
||||||
const ctx = getContext("Toolbar");
|
const ctx = getContext("Toolbar") ?? {};
|
||||||
|
|
||||||
let menuRef = null;
|
let menuRef = null;
|
||||||
|
|
||||||
$: ctx.setOverflowVisible(menuRef != null);
|
$: ctx.setOverflowVisible?.(menuRef != null);
|
||||||
$: if (menuRef) menuRef.style.top = "100%";
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<OverflowMenu
|
<OverflowMenu
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue