我正在研究 w2ui,在那里我获得了自己的自定义排序功能。排序功能正在查找,但箭头未显示在表格标题中。
我已经在姓氏中应用了我的自定义排序,您可以在单击名字时看到箭头。
如何显示箭头标记?
提前致谢。
onSort : function(event){
if(event.field == "lname"){
event.preventDefault();
records = w2ui.grid.records;
/*My custom logic starts here.(example only) */
if(ascending){
records.sort();
}
else{
records.reverse();
}
ascending = !ascending;
w2ui.grid.reset();
/*My custom logic endshere.(example only) */
}
}