Skip to content

Commit ee1a047

Browse files
committed
allow disabling keyboard shortcut
1 parent 3974ae0 commit ee1a047

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

.npmignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-nlp-annotate",
3-
"version": "0.3.5",
3+
"version": "0.3.7",
44
"homepage": "https://universaldatatool.github.io/react-nlp-annotate/",
55
"main": "./dist/lib.js",
66
"dependencies": {

src/components/Container/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default ({
2222
name: "Next",
2323
onClick: onNext
2424
},
25-
{ name: "Done" }
25+
{ name: "Save" }
2626
].filter(Boolean),
2727
[currentSampleIndex, numberOfSamples]
2828
)

src/components/NLPAnnotator/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export default function NLPAnnotator(props: NLPAnnotatorProps) {
3737
}
3838

3939
useEffect(() => {
40+
if (!props.hotkeysEnabled) return
4041
const eventFunc = e => {
4142
if (e.key === "Enter") {
4243
if (props.onFinish) props.onFinish(output)
@@ -67,7 +68,6 @@ export default function NLPAnnotator(props: NLPAnnotatorProps) {
6768

6869
const onFinish = useEventCallback(() => {
6970
if (!isPassingValidation) return
70-
console.log("onFinish", output)
7171
props.onFinish(output)
7272
})
7373

0 commit comments

Comments
 (0)