Auto scroll to preselected option in dropdownedit column

When opening the dropdown I need the scroll to go automatically to the option previously selected by the user, currently it stays at the top of the list


image

currently we are trying to search by the className and triggering a scrollIntoView but it is not working

       open: function(args) {

            const element = args.popup.element as HTMLElement;            

            const aux = element.lastChild;

            const list = aux.firstChild as HTMLElement;

            const ulList = document.getElementById(list.id);

            const selectedOne = ulList.getElementsByClassName('e-active')[0];

           

            selectedOne.scrollIntoView();

           

          },


1 Reply 1 reply marked as answer

SP Sureshkumar P Syncfusion Team January 26, 2022 08:41 AM UTC

Hi Christian, 
 
Our latest version will work as expected behavior of scroller is present at previous selected value. Please check the below screenshot.  
 
Screen shot:  
 
 
 
If still facing the issue, then please update your Syncfusion package version with issue replicating sample. That will help us to provide exact solution as earlier as possible. 
 
Regards, 
Sureshkumar P 


Marked as answer
Loader.
Up arrow icon