一旦定義自定義排序爲列像Github和UI-Gridui-grid從自定義排序算法中獲取當前列(字段)名稱?
你怎麼會從內部的算法訪問列?
var myAwesomeSortFn = function(a,b, rowA, rowB, direction){
// "Need to access the name (field) of column being sorted here";
var column = "No Idea"
console.log("sorting by column " + column);
if (a == b) return 0;
if (a < b) return -1;
if (a > b) return 1;
};
你可以發佈你在哪裏代碼調用'myAwesomeSortFn'? –
請參閱上面的Github鏈接。 – MishaT