You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a table that I want to select some values from. I often use sorting, because it makes it easier to select a row that has a particular value, like a score or some other value.
I've noticed that if I clear the sorting, the tables revert to normal, but if select a row again, the selected row (the .value property of the table) remains as if it's still sorted.
A very simple example is this one.
Sort the "data" column by value. For the example use descending. Then select the first row that has the highest value, and observe the table.value is correct. Clear the sorting, and reselect the first row, which now shows 1 in the UI, but observe how the .value is actually 4!
Fixes#2756
There is a subtle bug when clearing table sort/filter, we reverted back
to the initial page but we did not tell the backend, so the was an
inconsistency in state. This fixes it while still showing the initial
state when possible.
Describe the bug
I have a table that I want to select some values from. I often use sorting, because it makes it easier to select a row that has a particular value, like a score or some other value.
I've noticed that if I clear the sorting, the tables revert to normal, but if select a row again, the selected row (the .value property of the table) remains as if it's still sorted.
Environment
{
"marimo": "0.9.14",
"OS": "Windows",
"OS Version": "11",
"Processor": "Intel64 Family 6 Model 126 Stepping 5, GenuineIntel",
"Python Version": "3.12.2",
"Binaries": {
"Browser": "129.0.6668.60",
"Node": "v20.14.0"
},
"Dependencies": {
"click": "8.1.7",
"docutils": "0.20.1",
"itsdangerous": "2.2.0",
"jedi": "0.19.1",
"markdown": "3.6",
"narwhals": "1.9.3",
"packaging": "24.0",
"psutil": "5.9.8",
"pygments": "2.17.2",
"pymdown-extensions": "10.7.1",
"pyyaml": "6.0.1",
"ruff": "0.5.2",
"starlette": "0.37.2",
"tomlkit": "0.12.4",
"typing-extensions": "4.12.2",
"uvicorn": "0.29.0",
"websockets": "11.0.3"
},
"Optional Dependencies": {
"pandas": "2.2.2"
}
}
Code to reproduce
A very simple example is this one.
Sort the "data" column by value. For the example use descending. Then select the first row that has the highest value, and observe the table.value is correct. Clear the sorting, and reselect the first row, which now shows 1 in the UI, but observe how the .value is actually 4!
The text was updated successfully, but these errors were encountered: