我使用的是IBM Content Navigator 2.0.3附带的Dojo和dojo/gridx。
网格数据来自我自己的全局数组,我将它用于其他用途。
大多数情况下,一切都很正常。但有时候,行的显示顺序不对。例如,它显示的不是预期的顺序{0,1,2,3,4,5,6...},而是行{5,0,2,3,4,1,6...}。这就像行不知何故被“交换”了一样。
我不知道为什么-是什么导致了这种行为。
当我在Chrome Developer工具中查看gridx商店时,顺序是可以的:
- this.grid.store:
add:ƒ ()
data:Array(11)
0:{mappedName: "FNOL Email.html", claimNumber: "K00000133690", description: "FNOL", documentType: "", contentRcvDate: "06/11/2018", …, "A1001001A18F11B80705D00000"}
1:{mappedName: "FNOLAck.msg", claimNumber: "K00000133690", description: "FNOL Acknowledge", documentType: "", contentRcvDate: "06/11/2018", …, "A1001001A18F11B80802G00002"}
2:{mappedName: "imagefile.gif", claimNumber: "K00000133690", description: "Claim FNOL for Smithers", documentType: "", contentRcvDate: "06/11/2018", …, "A1001001A18F11B80903A00004"}
3:{mappedName: "2-imagefile.gif", claimNumber: "K00000133690", description: "COR INS16", documentType: "", contentRcvDate: "06/11/2018", …, "A1001001A18F11B81002A00006"}
4:{mappedName: "MSOutlookMessage.msg", claimNumber: "K00000133690", description: "MSOutlookMessage", documentType: "", contentRcvDate: "06/11/2018", …, "A1001001A18F11B81056G00008"}
5:{mappedName: "MSWord.doc", claimNumber: "K00000133690", description: "signed medical authorization", documentType: "", contentRcvDate: "06/11/2018", …, "A1001001A18F11B81148F00010"}
6:{mappedName: "PDF Document.pdf", claimNumber: "K00000133690", description: "Incident Report", documentType: "", contentRcvDate: "06/11/2018", …, "A1001001A18F11B81228B00012"}
...
商店的索引也是按照正确的顺序排列的:
idProperty:"cm8DocId"
index:
A1001001A18F11B80705D00000:0
A1001001A18F11B80802G00002:1
A1001001A18F11B80903A00004:2
A1001001A18F11B81002A00006:3
A1001001A18F11B81056G00008:4
A1001001A18F11B81148F00010:5
A1001001A18F11B81228B00012:6
...
但是行在网格上的显示顺序不对。
当我在Chrome开发者工具中查看HTML元素时(例如:<div class="gridxRow" role="row" rowid="A1001001A18F11B81148F00010" rowindex="0"...>
),索引5显示为顶行,rowindex显示为0,依此类推。
问:你知道为什么会发生这种情况吗?
问:有什么故障排除的建议吗?
先谢谢你!
1条答案
按热度按时间wlzqhblo1#
我从包含我的网格的Dojo小部件中清除了一些无关的“导入”......问题“消失”了:
〈=注意注解掉的条目。
即使我的代码没有显式地 USING 其中的任何一个......从小部件定义(以及,大概,从运行时环境)中删除不必要的“导入”似乎可以解决这个问题(?)