Skip to content

Commit

Permalink
fix 'enter_key_submit=True' on 'rx.text_area' by disabling debounce
Browse files Browse the repository at this point in the history
  • Loading branch information
TimChild committed Oct 7, 2024
1 parent 7cd5c90 commit 367a766
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion reflex/components/radix/themes/components/text_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,13 @@ def create(cls, *children, **props) -> Component:
Returns:
The component.
"""
if props.get("value") is not None and props.get("on_change") is not None:
if (
props.get("value") is not None
and props.get("on_change") is not None
and props.get("enter_key_submit", False) is False
):
# create a debounced input if the user requests full control to avoid typing jank
# disabled when using `enter_key_submit`
return DebounceInput.create(super().create(*children, **props))
return super().create(*children, **props)

Expand Down

0 comments on commit 367a766

Please sign in to comment.