solara
solara copied to clipboard
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
Yes, I understand this is desired behaviour, but it would be complex to support this (would require walking through all the child trees). Would it help if you could opt out of this behaviour?
The need for Tooltips to ToggleButtonsSingle will always remain for us. If solara provides an alternative recipe to make those 2 components work together, please let me know.
I am not sure if it possible with vuetify actually. MaterialUI I think has (or had) the same issue. I wonder if drawing your own buttons and handling the selection yourself in Python is a good workaround, similar to this: https://github.com/mui/material-ui/issues/36270#issuecomment-2485817225