When editing a row, when the Enter key is pressed, the edit is committed. If the editor is a multi-line editor, e.g. for rich text, this leaves no way to add new lines in the text. It would be nice to have an option to disable commit-on-enter.
Hi,
I have same problem, added multi-line rich text editor and cannot add new lines with enter press, because it saves record.
Add way to disable it or override the way it works would be great !
PS. material-table is great
I'm using ChipInput with material-table, so to prevent enter from saving row, I set a key handler:
const handleKey = (e: React.KeyboardEvent<HTMLDivElement>) => {
if (e.key === 'Enter') {
e.stopPropagation()
}
}
return (
<ChipInput
value={props.value}
onAdd={add}
onDelete={remove}
newChipKeys={keys}
onKeyDown={e => handleKey(e)}
/>
)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.
Most helpful comment
I'm using ChipInput with material-table, so to prevent enter from saving row, I set a key handler: