From 6e02f7608897af8723f6357f961c34c9304d1d7c Mon Sep 17 00:00:00 2001 From: Kogel <42330679+kogel-net@users.noreply.github.com> Date: Mon, 10 Apr 2023 15:03:58 +0800 Subject: [PATCH] fix(Menuable) : calc ComputedTop(#376) --- src/Component/BlazorComponent/Mixins/Menuable/BMenuable.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Component/BlazorComponent/Mixins/Menuable/BMenuable.cs b/src/Component/BlazorComponent/Mixins/Menuable/BMenuable.cs index 80806605a..89adfeacc 100644 --- a/src/Component/BlazorComponent/Mixins/Menuable/BMenuable.cs +++ b/src/Component/BlazorComponent/Mixins/Menuable/BMenuable.cs @@ -131,6 +131,11 @@ protected double ComputedTop double top = 0; + if (activator is null || content is null) + { + return top; + } + if (Top) top += activator.Height - content.Height; if (!IsDefaultAttach)