-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: Preserve event_actions from @rx.event decorator in mixin event handlers #6099
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Preserve event_actions from @rx.event decorator in mixin event handlers #6099
Conversation
Greptile OverviewGreptile SummaryFixed a bug where
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Decorator as @rx.event decorator
participant MixinClass as EventActionsMixin
participant CopyFn as _copy_fn method
participant ChildClass as UsesEventActionsMixin
participant CreateHandler as _create_event_handler
Note over Decorator,MixinClass: Mixin Definition
Decorator->>MixinClass: Decorate handle_with_actions()
Decorator->>MixinClass: Set _rx_event_actions attribute
Note over ChildClass: Child Class Inherits Mixin
ChildClass->>CopyFn: Copy event handler from mixin
CopyFn->>CopyFn: Create new FunctionType
CopyFn->>CopyFn: Copy annotations
CopyFn->>CopyFn: Preserve BACKGROUND_TASK_MARKER
CopyFn->>CopyFn: Preserve _rx_event_actions (NEW)
CopyFn->>ChildClass: Return copied function
Note over CreateHandler: Event Handler Creation
ChildClass->>CreateHandler: Create event handler
CreateHandler->>CreateHandler: Get _rx_event_actions from fn
CreateHandler->>ChildClass: Return EventHandler with event_actions
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
masenf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome! thanks
No description provided.