Angular kendo Multiselect Focus

2 Answers 285 Views
MultiSelect
Tera
Top achievements
Rank 1
Iron
Iron
Tera asked on 03 Aug 2023, 03:13 PM

how to focus on first element of list at open click?

the focus is on bottom

i want to set focus on top of the list when is opened


		#projectmultiselect
		(open)="open(e)"
		(opened)="opened(e)"

 

2 Answers, 1 is accepted

Sort by
0
Hetali
Telerik team
answered on 03 Aug 2023, 05:48 PM

Hello Tera,

In order to focus on the first item of the Kendo UI MultiSelect upon opening the popup, use the focusItemAt method in the open event to set the desired index. For example:

<kendo-multiselect
  #projectmultiselect
  (open)="open()"
>
</kendo-multiselect>
@ViewChild('projectmultiselect') public multiselect;

public open() {
  this.multiselect.focusItemAt(0);
}

This StackBlitz example demonstrates the above discussed approach.

I hope this helps. Please let me know if I can further assist you.

Regards,
Hetali
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
0
Tera
Top achievements
Rank 1
Iron
Iron
answered on 04 Aug 2023, 10:31 AM

.focusItemAt is not a function

 

it doesn't work

 


	#areamultiselect
        (open)="openArea()"
    

@ViewChild('areamultiselect') public areamultiselect;


    public openArea() {
        this.areamultiselect.focusItemAt(0);
    }

Hetali
Telerik team
commented on 07 Aug 2023, 01:56 PM

Hi Tera,

Could you please confirm the Kendo UI DropDowns package version? The focusItemAt() function was introduced in v5.2.0.

If you're using v5.2.0 or above, please share an isolated Angular application replicating the issue. I can then investigate.

Regards,
Hetali
Progress Telerik
Tags
MultiSelect
Asked by
Tera
Top achievements
Rank 1
Iron
Iron
Answers by
Hetali
Telerik team
Tera
Top achievements
Rank 1
Iron
Iron
Share this question
or