sorting dojox mobile ListItem against label

懵懂的女人 提交于 2019-12-13 12:51:19

问题


I want to sort dojox mobile ListItem by label alphabetically. The label in my DOM looks like:

<div class="subject">Sort alphabetically against me only</div>
<span class="bomtype"> don't sort against me. </span>

I want to sort by the text in the label having class="subject" in ascending order. I am using Dojo 1.9.1.


回答1:


You can use dojox/mobile/EdgeToEdgeStoreList or dojox/mobile/RoundRectStoreList, for instance:

<ul data-dojo-type="dojox/mobile/EdgeToEdgeStoreList"
    data-dojo-props='store: store, query:{}, queryOptions: {sort: [{attribute: "label", descending: true}]}'></ul>

Note that, as documented, EdgeToEdgeDataList and RoundRectData list are deprecated in Dojo 1.9.



来源:https://stackoverflow.com/questions/19114247/sorting-dojox-mobile-listitem-against-label

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!