ember.js - No template update after createRecord with findQuery fetching -
i'm wonder why template doesn't updated after createrecord
when using findquery
fetch data.
when changing return this.store.findquery('timetracking', {year: year, month: month, user_id: user_id});
return this.store.find('timetracking');
template gets updated new records.
i don't want fetch records save bandwith, when using find/findquery
query params, newly created records doesn't show in template.
do have "force" reload? , how this?
update
the ember inspector shows new records.
findquery
puts job of filtering on server's back. ember info assumes results returned results associated collection. find
no query or id (findall
) homecoming records found in store, because realizes weren't looking filtered set, if create new record gladly knows include in of available records. can manually force record collection of records using pushobject
.
// assuming you're in context of `findquery` results, , model var model = this.get('model'), record = this.store.createrecord('timetracking', {...}); model.pushobject(record);
ember.js ember-data
No comments:
Post a Comment