-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
feature:st.dataframeRelated to the `st.dataframe` elementRelated to the `st.dataframe` elementpriority:P3Medium priorityMedium prioritystatus:confirmedBug has been confirmed by the Streamlit teamBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedSomething isn't working as expected
Description
Checklist
- I have searched the existing issues for similar issues.
- I added a very descriptive title to this issue.
- I have provided sufficient information below to help reproduce this issue.
Summary
If you use filtering to highlight cells, then sort a column without closing the filter, the former positions of the highlighted (filtered) cells remain highlighted. If you sequentially navigate the highlight cells, they remain in their incorrect positions. You have to update the filter to change the highlight positions to match the new sort order.
2025-06-09_17-52-28.mp4
Reproducible Code Example
import streamlit as st
import pandas as pd
df = pd.DataFrame({
"A": ["foo","foo","foo","bar","bar","bar", "baz", "baz", "baz"],
"B": ["one","one","two","two","one","one", "two", "two", "one"]
})
st.dataframe(df)Steps To Reproduce
- Run the app
- Use the dataframe filter to search for "foo"
- Leave the filter open and click the column header to sort and move the "foo" cells.
- Click the step buttons in the filter.
You will remain stuck within the former positions of the "foo" cells (until you update the string filter).
Expected Behavior
No response
Current Behavior
No response
Is this a regression?
- Yes, this used to work in a previous version.
Debug info
- Streamlit version: 1.45.1
- Python version: 3.13
- Operating System: Mac
- Browser: Prisma
Additional Information
No response
github-actions
Metadata
Metadata
Assignees
Labels
feature:st.dataframeRelated to the `st.dataframe` elementRelated to the `st.dataframe` elementpriority:P3Medium priorityMedium prioritystatus:confirmedBug has been confirmed by the Streamlit teamBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expectedSomething isn't working as expected