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
All event handlers inherit from event triggers #2507
Conversation
…on_checked_change to on_change
def render(self) -> dict: | ||
"""Render the component.""" | ||
render_dict = super().render() | ||
print(render_dict) | ||
self._replace_prop_names(render_dict) | ||
print(render_dict) | ||
return render_dict |
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.
i think this logic should go in Component.render
itself. since the _rename_props
attribute is defined on Component
, it wouldn't really make sense to be able to set _rename_props
, but then not have it work until the downstream component overrides render
.
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.
added
reflex/components/component.py
Outdated
Returns: | ||
None | ||
""" | ||
for ix, prop in enumerate(render_dict["props"]): |
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.
for ix, prop in enumerate(render_dict["props"]): | |
# fast path | |
if not self._rename_props: | |
return | |
for ix, prop in enumerate(render_dict["props"]): |
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.
changed
…on_checked_change to on_change
reflex/components/component.py
Outdated
@@ -648,8 +651,25 @@ def render(self) -> Dict: | |||
), | |||
autofocus=self.autofocus, | |||
) | |||
self._replace_prop_names(rendered_dict) | |||
self._replace_prop_names(rendered_dict) |
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.
Why twice?
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.
removed this
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.
approve, when CI passes
All Submissions:
Type of change
Please delete options that are not relevant.
New Feature Submission:
Changes To Core Features:
After these steps, you're ready to open a pull request.