Skip to content

Commit

Permalink
Add TooltipMixin._rename to buttons _rename
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Nov 13, 2023
1 parent dff882d commit 1edd15c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion panel/widgets/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class Button(_ClickButton, TooltipMixin):
Toggles from False to True while the event is being processed.""")

_rename: ClassVar[Mapping[str, str | None]] = {
'clicks': None, 'name': 'label', 'value': None,
**TooltipMixin._rename, 'clicks': None, 'name': 'label', 'value': None,
}

_source_transforms: ClassVar[Mapping[str, str | None]] = {
Expand Down
4 changes: 4 additions & 0 deletions panel/widgets/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,8 @@ class RadioButtonGroup(_RadioGroupBase, _ButtonBase, TooltipMixin):
objects=['horizontal', 'vertical'], doc="""
Button group orientation, either 'horizontal' (default) or 'vertical'.""")

_rename: ClassVar[Mapping[str, str | None]] = {**_RadioGroupBase._rename, **TooltipMixin._rename}

_source_transforms = {
'value': "source.labels[value]", 'button_style': None, 'description': None
}
Expand Down Expand Up @@ -755,6 +757,8 @@ class CheckButtonGroup(_CheckGroupBase, _ButtonBase, TooltipMixin):
objects=['horizontal', 'vertical'], doc="""
Button group orientation, either 'horizontal' (default) or 'vertical'.""")

_rename: ClassVar[Mapping[str, str | None]] = {**_CheckGroupBase._rename, **TooltipMixin._rename}

_source_transforms = {
'value': "value.map((index) => source.labels[index])", 'button_style': None,
'description': None
Expand Down

0 comments on commit 1edd15c

Please sign in to comment.