fix drawer on_open_change event (#2755)

This commit is contained in:
Thomas Brandého 2024-02-29 18:04:59 +01:00 committed by GitHub
parent 4f9cdd6472
commit bea9eb4349
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,5 @@
"""Drawer components based on Radix primitives."""
# Based on Vaul: https://github.com/emilkowalski/vaul
# Style based on https://ui.shadcn.com/docs/components/drawer
from __future__ import annotations
@ -20,12 +21,7 @@ class DrawerComponent(RadixPrimitiveComponent):
lib_dependencies: List[str] = ["@radix-ui/react-dialog@^1.0.5"]
LiteralDirectionType = Literal[
"top",
"bottom",
"left",
"right",
]
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class DrawerRoot(DrawerComponent):
@ -70,7 +66,7 @@ class DrawerRoot(DrawerComponent):
"""
return {
**super().get_event_triggers(),
EventTriggers.ON_OPEN_CHANGE: lambda e0: [e0.target.value],
EventTriggers.ON_OPEN_CHANGE: lambda e0: [e0],
}