ToggleButtonsSingle: child Button value overridden by its Tooltip
Either there is something I'm missing in the documentation, or the value set by ToggleButtonsSingle is not one of the tool-tipped child Buttons, but instead its Tooltip's.
Please have a look at that simple example (33 lines) on pycafe: https://py.cafe/snippet/solara/v1?#c=H4sIABPnVWgEA7VTUUvDMBD-KyG-VFiLCr4UCqLPgujwZRkSm1sXTJOapi1l7L97WVLncNuT3kND7vvuy93XZENLI4DmVNaNsY60RnHLmWa6lzCQIiYyC7x0soeEUSVbx-il59xFtDRYrUE7pgWsyMO0TWzPLcknkecosmidXV7mXoFgDNKtJ8rcVJWC-845o9sXqXGTBJaPnqsOCi86C8kL_zH6LQCK1--CEw1DSOTEU7MWXPKdw759jT_drxiHxxvlZINTvvrxS24Fjrrn7iJyQ5M_uptCltiR5jUUjNZCpt7JtLJSpKZzSmpgdEZ-l4UZGA2HHmN44WJuOzgGRm1xkiBAt7BDD7HoCMYZJ-JP_wsngtSxDicHTjP-zYEzt_mJV5BMk--vtp8lWhfrHrn9EGbQyYpRj-Zk45ct-sY0nVELn520UGN1iy8uVO0QNzb-DYYM7pvRrY3GTDMaIQWk_VV2c5tdI6T4iHPSXHdKzehKKkCtxXL7BSSVSZXJAwAA
Comment out the Tooltips to see the expected behavior.
Is this expected, and if so what am I doing wrong?
PyCafe
Playground for Python web frameworks. Run and edit Python code snippets for web frameworks in a web browser.
2 Replies
see also bug report: https://github.com/widgetti/solara/issues/1069
Dfred
<:issue_open:882464248951877682> [widgetti/solara] ToggleButtonsSingle child Button's value overridden by its Tooltip
Expected Behavior
Value set by ToggleButtonsSingle (or passed to the on_value parameter) should always take the value of child Buttons.
Current Behavior
when ToggleButtonsSingle has a child Button with a Tooltip, ToggleButtonsSingle sets the value of that Tooltip's label instead of the Button value.
Steps to Reproduce the Problem
see this pycafe code.
Specifications
- Solara Version: 1.47.0
- Platform: Ubuntu amd64
- Affected Python Versions: 3.12
Created