Beispiel #1
0
        private async Task Expand()
        {
            // An element location must be known every time we need to show the dropdown. The reason is mainly
            // because sometimes input can have different offset based on the changes on the page. For example
            // when validation is triggered the input can be pushed down by the error messages.
            elementInfo = await JSUtilitiesModule.GetElementInfo(ElementRef, ElementId);

            await JSClosableModule.Register(dotNetObjectRef, ElementRef);

            Expanded = true;

            // automatically set focus to the dropdown so that we can make it auto-close on blur event
            ExecuteAfterRender(async() => await DropdownElementRef.FocusAsync());
        }