Remove toggle_state method
This commit is contained in:
parent
61f3aefb62
commit
6db3e465e8
@ -242,13 +242,8 @@ class ContextMenuCheckBoxItem(RadixThemesComponent):
|
||||
# Whether the checkbox is disabled.
|
||||
disabled: Var[bool]
|
||||
|
||||
# Event handler for when the checkbox state changes.
|
||||
# Fired when the checkbox state changes.
|
||||
on_check_change: EventHandler[passthrough_event_spec(bool)]
|
||||
|
||||
def toggle_state(self):
|
||||
"""Toggle the checked state dynamically."""
|
||||
if self.checked is not None:
|
||||
self.checked.set(not self.checked.get())
|
||||
|
||||
class ContextMenu(ComponentNamespace):
|
||||
"""Menu representing a set of actions, displayed at the origin of a pointer right-click or long-press."""
|
||||
@ -263,5 +258,4 @@ class ContextMenu(ComponentNamespace):
|
||||
separator = staticmethod(ContextMenuSeparator.create)
|
||||
checkbox_item = staticmethod(ContextMenuCheckBoxItem.create)
|
||||
|
||||
|
||||
context_menu = ContextMenu()
|
||||
|
Loading…
Reference in New Issue
Block a user