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:
parent
4a4806d638
commit
2c01cd5195
1 changed files with 1 additions and 6 deletions
|
|
@ -93,12 +93,7 @@ export default function NodeDescription({
|
||||||
onChange={(e) => setNodeDescription(e.target.value)}
|
onChange={(e) => setNodeDescription(e.target.value)}
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
handleKeyDown(e, nodeDescription, "");
|
handleKeyDown(e, nodeDescription, "");
|
||||||
if (
|
if (e.key === "Escape") {
|
||||||
e.key === "Enter" &&
|
|
||||||
e.shiftKey === false &&
|
|
||||||
e.ctrlKey === false &&
|
|
||||||
e.altKey === false
|
|
||||||
) {
|
|
||||||
setInputDescription(false);
|
setInputDescription(false);
|
||||||
setNodeDescription(nodeDescription);
|
setNodeDescription(nodeDescription);
|
||||||
setNode(nodeId, (old) => ({
|
setNode(nodeId, (old) => ({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue