Bugfix
This commit is contained in:
parent
f71f9dfc09
commit
de71349d15
|
@ -62,7 +62,7 @@ export default class Autocomplete extends Component {
|
|||
if (evt.which == 13 && highlightedIndex == -1) {
|
||||
onSubmit(value);
|
||||
} else if (evt.which == 40 && value.length == 0) {
|
||||
setInputItems(this.props.vocabulary); // Show all options on key down
|
||||
this.setState({ inputItems: this.props.vocabulary }); // Show all options on key down
|
||||
} else if (evt.which == 27) {
|
||||
this.props.onCancel && this.props.onCancel();
|
||||
} else {
|
||||
|
|
|
@ -26,6 +26,7 @@ export default class RelationEditor extends Component {
|
|||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.element = React.createRef();
|
||||
}
|
||||
|
||||
|
@ -47,7 +48,9 @@ export default class RelationEditor extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
onSubmit = value => {
|
||||
onSubmit = () => {
|
||||
const value = this.element.current.querySelector('input').value;
|
||||
|
||||
const updatedAnnotation = this.props.relation.annotation.clone({
|
||||
motivation: 'linking',
|
||||
body: [{
|
||||
|
|
Loading…
Reference in New Issue