The order of items in a select box is reversed when the user starts typing

Hello everyone.

I use a lot of selectbox in my Streamlit application, and I noticed that while the options are sorted alphabetically when the page is loaded, the order gets reversed as soon as I start typing.

For instance, I have the following options in the list:
AH00
AH01
AH02
AH03

As soon as I type ‘A’ in the box, the order becomes:
AH03
AH02
AH01
AH00

Is it the expected behavior?

This is how I define my selectboxes:
spec_no = st.selectbox(‘Select specification’, spec_data[‘SPEC_NO’].unique().tolist())

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.