I have a dropdown list component that has around 100 selections in it. The list is updated by a query that is sorted by the the most recent being at the top of the list.
The thing is, whenever I open my list, it is always on the last item in the list, so I have to go down, scroll all of the way to the top to get to the most recent.
Is there a way I can start with the first item in the list selected so this extra step isn’t necessary?
does the table you are querying have an id column? if so add order by id desc to your query.
There are a number of ways to set which item in your drop down are selected.
If you always want to have the first item selected, try
dropdown = event.source.parent.getComponent('Dropdown')
You can also select specific items – check out the docs for drop downs to see how to select items by value or label.
I must have worded my question in a way that made it misleading.
The problem was I wanted the scroll bar to start at the top when the dropdown list was opened.
It was starting at the bottom. Turns out I had saved it in the designer with values in the ‘selected value’ section of the properties editor, so when I opened the list, it always went straight to that value.
Thanks for the feedback.