Example #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 diferent offset based on the changes on the page. For example
            // when validation is trigered the input can be pushed down by the error messages.
            elementInfo = await JSRunner.GetElementInfo(ElementRef, ElementId);

            await JSRunner.RegisterClosableComponent(dotNetObjectRef, ElementId);

            Expanded = true;
        }
Example #2
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 JSRunner.GetElementInfo(ElementRef, ElementId);

            await JSRunner.RegisterClosableComponent(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());
        }