Hello i have a question about computed properties and DS.hasMany relation
so when you make this relation checklistItems: DS.hasMany("projects/checklist-item"),
it goes directly to the backend and get requested data
i wanna add something to this request to check the current project stage if [stage 1 , stage 2 …] cause each stage has specific items
it is possible to do something like this ? not working !
checklistItems: DS.hasMany("projects/checklist-item"),
// checklistItems: computed('currentStage.name', function(){
// const stage = this.get("currentStage.name");
// const params = stage ? {stage} : {};
// const stageItems = this.store.query("projects/checklist-item", params);
// if(stageItems != null){
// return stageItems
// }
// }),
2 posts - 2 participants