the other day I spotted an (for me) unexpected behaviour on using a standard st.dataframe().
My expected behaviour is that the dataframe would resort once you click on a columnās header.
I observed this on my mobile phone (Android but with several browsers) as well as the dev-device option of Chrome at my desktop.
Anyone else having the same issue. Any workarounds (click eventsā¦)?
thanks for having a look at it.
I can replicate this at with any streamlit app - also from the official streamlit gallery, such as the ābug-reportā app.
For better illustration of the matter you can have a look at this screen recording: Link
Thanks for keeping me updated.
Jonas
NB: Tables created with streamlit-aggrid are fine.
I just tried the app you linked and could get it to misbehave as you illustrated on Chrome (dev-device Windows 10) and Android, but at the same time if I tried a different app and there was no problem with the dataframe sorting.
Linked Bug Report df doesnāt sort; other app df does sort:
I checked on the app for reference. I also get the sorting feature on mobile for it.
On my code I tried st.dataframe() as well as st.write() with no effect.
I simplified a test code as much as only having streamlit and pandas imported - same isue.
For your information, my app runs on streamlit version 1.11.0
Can you try upgrading to the latest Streamlit version? If itās still an issue, feel free to file a bug report as a Github issue, and weāll get an engineer from our team to look into it!