It seems that selectbox doesn’t behave properly if the list is more than 136 items long? i.e. list of countries in the world ( st.sidebar.selectbox(’’,countries) )? Anybody experienced a similar problem? So if the list is that long, selectbox will always select first element in your list regardless of your choice? And I wonder if there is an alternative to have such longlist other than selectbox
Thank you so much for your prompt reply, I use Python 3.7.4 , no virtual env and the OS is Mac. Your code works perfectly, however, when using my list instead, it didn’t work , top_conf is a list of 185 country names
Thanks for your help, it turns out that the problem in another function in my code that caused the problem. It was long night on a silly error, thanks much appreciated.