Open antonioaltamura opened 8 years ago
this is my code
var engine = new Bloodhound({ remote: { url: '/api/community/users?q=%QUERY', wildcard: '%QUERY' }, datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace('name'); }, queryTokenizer: Bloodhound.tokenizers.whitespace }); engine.initialize(); $('#tokenfield-typeahead').tokenfield({ typeahead: [null, { display: 'name', source: engine.ttAdapter() }] });
my json is the form: [{"_id":"56a6b050d3a7b8b811324d64","name":"John","age":20,"__v":0}]
[{"_id":"56a6b050d3a7b8b811324d64","name":"John","age":20,"__v":0}]
when I select an element from typeahead dropdown I get an error: Uncaught TypeError: Cannot read property 'toString' of undefined
Uncaught TypeError: Cannot read property 'toString' of undefined
I guess it's the same problem of this https://github.com/sliptree/bootstrap-tokenfield/issues/189
this is my code
my json is the form:
[{"_id":"56a6b050d3a7b8b811324d64","name":"John","age":20,"__v":0}]
when I select an element from typeahead dropdown I get an error:
Uncaught TypeError: Cannot read property 'toString' of undefined