The Textarea component currently increments n_submit when the enter key is pressed, and the user must press shift + enter in order to create a newline.
This isn't the default behaviour of a <textarea> component. However, since it seems to be common desired behaviour in a chat style application, we shouldn't change the default behaviour.
Instead this PR adds a new prop submit_on_enter, which when set to False, creates a new line in the Textarea and does not increment n_submit.
The Textarea component currently increments
n_submit
when the enter key is pressed, and the user must press shift + enter in order to create a newline.This isn't the default behaviour of a
<textarea>
component. However, since it seems to be common desired behaviour in a chat style application, we shouldn't change the default behaviour.Instead this PR adds a new prop
submit_on_enter
, which when set toFalse
, creates a new line in theTextarea
and does not incrementn_submit
.See #1035