mirror of
https://github.com/bendtherules/demo-trello-app.git
synced 2026-08-18 13:42:40 +00:00
Task edit - Handle submit on enter key press
This commit is contained in:
@@ -95,6 +95,11 @@ export function CreateOrEditTaskCard({
|
||||
placeholder="Create task"
|
||||
autoFocus={true}
|
||||
value={newCardText}
|
||||
onKeyPress={e => {
|
||||
if (e.key === 'Enter') {
|
||||
onSubmit(e);
|
||||
}
|
||||
}}
|
||||
onChange={e => setNewCardText(e.target.value)}
|
||||
></textarea>
|
||||
<div className={styles.createActionBtnContainer}>
|
||||
|
||||
Reference in New Issue
Block a user