I have a model named variableDataPackages whose structure is as follows:
TM.VariableDataPackage = DS.Model.extend({
name: DS.attr(),
number: DS.attr(),
variableData: DS.attr(),
vds:DS.attr(),
asset_id:DS.attr(),
vdp_id:DS.attr(),
type: DS.attr(),
description: DS.attr(),
vdpackage_id:function(){
if((this.get("type.name") != "d")&&(this.get("type.name") != "u")){
return this.get("type.name")
} else {
return this.get("type.name") + this.get("number");
}
}.property("type","number")
})
The display value is a computed property and the set of records contained within the store for this model is frequently updated/deleted/created.
I want to be able to sort the records based on the vdpackage_id.
Is there any way to do this?
Aucun commentaire:
Enregistrer un commentaire