Skip to content

fix: preserve style_cell mapping when table sorted descending#8912

Open
joaquinhuigomez wants to merge 2 commits intomarimo-team:mainfrom
joaquinhuigomez:fix/table-style-cell-sort-descending
Open

fix: preserve style_cell mapping when table sorted descending#8912
joaquinhuigomez wants to merge 2 commits intomarimo-team:mainfrom
joaquinhuigomez:fix/table-style-cell-sort-descending

Conversation

@joaquinhuigomez
Copy link
Copy Markdown

Row styles should be tied to data indices, not display order. The _style_cells and _hover_cells functions reversed row_ids when sorting descending, causing styles to be applied to the wrong rows.

Removes the reversal so style functions always receive the correct data row index regardless of sort direction. Also removes the now-unused descending parameter from both functions.

Closes #8847

Row styles should be tied to data indices, not display order.
Removing the descending reversal of row_ids fixes misapplied
styles when sorting in descending order.

Closes marimo-team#8847
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Mar 28, 2026 8:22pm

Request Review

@github-actions
Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

style_cell styles lost when sorting table in descending order

1 participant