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"
|
placeholder="Create task"
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
value={newCardText}
|
value={newCardText}
|
||||||
|
onKeyPress={e => {
|
||||||
|
if (e.key === 'Enter') {
|
||||||
|
onSubmit(e);
|
||||||
|
}
|
||||||
|
}}
|
||||||
onChange={e => setNewCardText(e.target.value)}
|
onChange={e => setNewCardText(e.target.value)}
|
||||||
></textarea>
|
></textarea>
|
||||||
<div className={styles.createActionBtnContainer}>
|
<div className={styles.createActionBtnContainer}>
|
||||||
|
|||||||
Reference in New Issue
Block a user