refactor: Remove unnecessary code for handling Enter (#5041)

refactor: Remove unnecessary code for handling Enter key in NodeDescription component

Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
This commit is contained in:
anovazzi1 2024-12-09 12:34:40 -03:00 committed by GitHub
commit 2c01cd5195
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -93,12 +93,7 @@ export default function NodeDescription({
onChange={(e) => setNodeDescription(e.target.value)}
onKeyDown={(e) => {
handleKeyDown(e, nodeDescription, "");
if (
e.key === "Enter" &&
e.shiftKey === false &&
e.ctrlKey === false &&
e.altKey === false
) {
if (e.key === "Escape") {
setInputDescription(false);
setNodeDescription(nodeDescription);
setNode(nodeId, (old) => ({