dimanche 17 mars 2019

How to access controller property in Ember.computed.sort

In a Ember 1.13 i have a controller that uses Ember.computed.sort:

export default Ember.Component.extend({
    sortedItems: Ember.computed.sort("allItems", function(a, b) {
        //How to access columnList from here?
    }
    columnList: ["name","shortcode"]
})

I need to access columnList property of the component controller instance to customize behaviour of comparision function provided to Ember.computed.sort. How to access the columnList inside comparision function in a place indicated in the code above?




Aucun commentaire:

Enregistrer un commentaire