-
-
Notifications
You must be signed in to change notification settings - Fork 328
Open
Labels
priority-3-lowMay be resolved one any timeline.May be resolved one any timeline.type-revisionAbout a change in functionality or behaviorAbout a change in functionality or behavior
Description
Current Situation
Currently we utilize a decorator to allow for prevent_default
and stop_propogation
. But this syntax is pretty awkward.
@component
def LoginForm(props):
@reactpy.event(prevent_default=True, stop_propogation=True)
def handle_login(event):
...
Proposed Actions
Add callbacks to the event object which perform the same function, removing the need for a decorator.
@component
def LoginForm(props):
def handle_login(event):
event.prevent_default()
event.stop_propogation()
It might also make sense to convert our event
object from dict
to object
using Munch
, as the dot interface feels a bit more JavaScripty.
elro444 and huixiao8973
Metadata
Metadata
Assignees
Labels
priority-3-lowMay be resolved one any timeline.May be resolved one any timeline.type-revisionAbout a change in functionality or behaviorAbout a change in functionality or behavior