Skip to content

Commit

Permalink
Bugfix: dropdown suggestions now work properly
Browse files Browse the repository at this point in the history
  • Loading branch information
rsimon committed Nov 16, 2022
1 parent 060cd36 commit 469d600
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ <h1>Homer: The Odyssey</h1>
});

var connections = recogito.Connections([ r, a ], {
showLabels: true
showLabels: true,
vocabulary: [ 'relatedTo', 'foundAt', 'observedAt' ]
});

connections.on('createConnection', function(c) {
Expand Down
9 changes: 6 additions & 3 deletions src/editor/RelationEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,16 @@ export default class PayloadEditor extends Component {
setState();
}

onChange = inputValue =>
onChange = inputValue => {
this.setState({ inputValue });
}

onSubmit = inputValue => {
this.setState({ inputValue });

onSubmit = () => {
const updated = this.state.connection.clone({ body: {
type: 'TextualBody',
value: this.state.inputValue,
value: inputValue,
purpose: 'tagging'
}});

Expand Down

0 comments on commit 469d600

Please sign in to comment.