@neo4j-cypher/react-codemirror
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -66,2 +66,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
}); | ||
_defineProperty(this, "keyUp", event => { | ||
const { | ||
onKeyUp | ||
} = this.props; | ||
onKeyUp && onKeyUp(event); | ||
}); | ||
this.state = { | ||
@@ -155,2 +161,3 @@ focused: false | ||
this.cypherEditor.onKeyDown(this.keyDown); | ||
this.cypherEditor.onKeyUp(this.keyUp); | ||
onEditorCreated && onEditorCreated(this.cypherEditor); | ||
@@ -168,2 +175,3 @@ } | ||
this.cypherEditor.offKeyDown(this.keyDown); | ||
this.cypherEditor.offKeyUp(this.keyUp); | ||
this.cypherEditor.destroy(); | ||
@@ -170,0 +178,0 @@ } |
@@ -75,2 +75,8 @@ "use strict"; | ||
}); | ||
(0, _defineProperty2.default)(this, "keyUp", event => { | ||
const { | ||
onKeyUp | ||
} = this.props; | ||
onKeyUp && onKeyUp(event); | ||
}); | ||
this.state = { | ||
@@ -164,2 +170,3 @@ focused: false | ||
this.cypherEditor.onKeyDown(this.keyDown); | ||
this.cypherEditor.onKeyUp(this.keyUp); | ||
onEditorCreated && onEditorCreated(this.cypherEditor); | ||
@@ -177,2 +184,3 @@ } | ||
this.cypherEditor.offKeyDown(this.keyDown); | ||
this.cypherEditor.offKeyUp(this.keyUp); | ||
this.cypherEditor.destroy(); | ||
@@ -179,0 +187,0 @@ } |
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author": "Neo4j Inc.", | ||
@@ -54,3 +54,3 @@ "license": "Apache-2.0", | ||
"@babel/runtime": "^7.20.13", | ||
"@neo4j-cypher/codemirror": "1.0.0" | ||
"@neo4j-cypher/codemirror": "1.0.1" | ||
}, | ||
@@ -57,0 +57,0 @@ "peerDependencies": { |
@@ -15,3 +15,3 @@ import * as React from "react"; | ||
ValueChangedListener, | ||
KeyDownListener, | ||
KeyListener, | ||
LineNumberClickListener, | ||
@@ -269,5 +269,9 @@ LineNumberFormatter | ||
/** | ||
* A listener for when the user presses a key down in the editor | ||
* A listener for when the user performs a key down in the editor | ||
*/ | ||
onKeyDown?: KeyDownListener; | ||
onKeyDown?: KeyListener; | ||
/** | ||
* A listener for when the user performs a key up in the editor | ||
*/ | ||
onKeyUp?: KeyListener; | ||
@@ -274,0 +278,0 @@ /** |
26042
813
+ Added@neo4j-cypher/codemirror@1.0.1(transitive)
+ Added@neo4j-cypher/editor-support@1.0.1(transitive)
- Removed@neo4j-cypher/codemirror@1.0.0(transitive)
- Removed@neo4j-cypher/editor-support@1.0.0(transitive)