protected override void OnVisibleChanged(object sender, bool e)
        {
            ExecuteAfterRender(async() =>
            {
                if (ParentDropdown != null && ParentDropdown is AntDesign.Dropdown dropdown)
                {
                    var dropdownMenuElementInfo = await JSRunner.GetElementInfo(ElementRef, ElementId);

                    MenuStyleNames = GetMenuStyleNames(dropdown.ElementInfo, dropdownMenuElementInfo, dropdown.Direction);

                    await InvokeAsync(StateHasChanged);
                }
            });

            base.OnVisibleChanged(sender, e);
        }
Exemple #2
0
        protected async Task OnSliderMouseDown(MouseEventArgs e)
        {
            // only the left button can trigger the change
            if (e.Button != 0)
            {
                return;
            }

            mouseDown = true;

            sliderElementInfo = await JSRunner.GetElementInfo(ElementRef, ElementId);

            sliderStart = sliderElementInfo.BoundingClientRect.Left;
            sliderWidth = sliderElementInfo.BoundingClientRect.Width;

            startedAt = e.ClientX;

            Percentage = CalculatePercentage(e.ClientX);

            await CurrentValueHandler(CalculateValue( Percentage ));
        }
        protected override async Task OnAfterRenderAsync(bool firstRender)
        {
            elementInfo = await JSRunner.GetElementInfo(ElementRef, ElementId);

            await base.OnAfterRenderAsync(firstRender);
        }