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
In marimo 0.5.2, the code below works fine and prints out 1, 2, 3, ... whenever the wrapped switch is clicked. In marimo 0.6.0, this is no longer the case. Only the first click makes the switch call it's on_change handler. I would expect the on_change handler to fire every time.
On >= 0.5.2, the handler is being called, but I'm also seeing a bug in which the batched switch UI element is resetting after being clicked. Do you also see that?
By the way, I figured out the flickering/resetting of the slider. It's because your on_change handler calls get_state(). To fix that, use the function API for set_state, like below:
Describe the bug
In marimo 0.5.2, the code below works fine and prints out 1, 2, 3, ... whenever the wrapped switch is clicked. In marimo 0.6.0, this is no longer the case. Only the first click makes the switch call it's on_change handler. I would expect the on_change handler to fire every time.
Environment
{
"marimo": "0.6.0",
"OS": "Windows",
"OS Version": "11",
"Processor": "Intel64 Family 6 Model 126 Stepping 5, GenuineIntel",
"Python Version": "3.12.2",
"Binaries": {
"Browser": "123.0.6312.123",
"Node": "v14.16.0"
},
"Requirements": {
"click": "8.1.7",
"importlib-resources": "missing",
"jedi": "0.19.1",
"markdown": "3.6",
"pymdown-extensions": "10.7.1",
"pygments": "2.17.2",
"tomlkit": "0.12.4",
"uvicorn": "0.29.0",
"starlette": "0.37.2",
"websocket": "missing",
"typing-extensions": "4.9.0",
"black": "24.3.0"
}
}
Code to reproduce
here's a minimal repro:
The text was updated successfully, but these errors were encountered: