charlieridley / ember-typeahead Goto Github PK
View Code? Open in Web Editor NEWEmberJS autocomplete component using typeahead.js
License: MIT License
EmberJS autocomplete component using typeahead.js
License: MIT License
I've noticed that the typeahead doesn't function correctly with spaces in the actual field (like 'hello world'). On the typeahead examples it works as expected, but not using this plugin. I don't know where to start to fix this or why it would break.
Got it working nicely on my first input , i changed ember select with it and got it styled. But on my formset, i've another autocomplete field. The second autocomplete field fetched the same data as first. (Same output on both of them.).
Route
controller.set('organizations', this.store.findAll('agents/organization'));
controller.set('dbcountries', this.store.findAll('agents/geography/countries'));
Models
var Organization = DS.Model.extend({
name: DS.attr('string'),
});
Organization.FIXTURES = [
{
id: 1,
name: 'TU',
},
{
id: 2,
name: 'TLU',
}
];
'var Countries = DS.Model.extend({
code: DS.attr('string'),
name: DS.attr('string')
});
Countries.FIXTURES = [
{
id: 1,
code: 'est',
name: 'Estonia'
},
{
id: 2,
code: 'fin',
name: 'Finland'
}
];
HBS
This works properly
{{type-ahead data=organizations name="name"
selection=field.myColour placeholder="Organizations" class="form-control"}}
This gives results of organization.
{{type-ahead data=dbcountries name="code"
selection=field.country placeholder="Countries" class="form-control"}}
I have a page with:
when I render the page/view/template my console says:
Assertion failed: You must use Ember.set() to access this property (of Ember.TypeAheadComponent:ember660) ember-v1.3.2.js:3285
Assertion failed: You called yield in a template that was not a layout ember-v1.3.2.js:3285
Uncaught TypeError: Cannot call method '_yield' of undefined
App.PostsRoute = Ember.Route.extend
model: ->
App.Post.find()
#handlebar
{{type-ahead data=content name="type" selection=myColour}}
If I use [ Ember.Object.create(type: "Red"), Ember.Object.create(type: "Reddi") ]
in model it works fine. How to make it work for App.Post.find() ?
Any help would be appreciated.
it is possible to work with dynamic dataset?
The ember
version in the bower.json
, is 1.2.0
which is quite old. It seems to work fine with ember
1.10
so maybe it's worth while to indicate it's compatible on 1.2
thur to 1.10
. Unless there's an incompatibility I haven't noticed
Hello,
I am working with ember and typehead. Currently, your implementation uses local. But if I want dynamic data, I would like to use remote or update the local dataset. I dont want to make an ajax request with plain jquery. I want to keep using my model and use ember-data.
Thanks for the code,
Juan
"TypeError: undefined is not a function" error inside vendor.js file cause of this statement Em.isEmpty(obj.get(key))
this is my component
{{type-ahead data=companies content=companies name="selectedCompany" selection=companies value=selectedCompany}}
it will be very useful for me to use typeahead component, I hope it will work for my project.
But setup of component is not clear for me. plz help me
Working on implementing the script for last couple of hours. Trying to get it to work with latest version of typehead.js
. When I start typing nothing happens. No error..
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.