我正在使用 IBM Content Navigator 2.0.3 附带的 Dojo 和 dojo/gridx。
网格数据来自我自己的全局数组,我将其用于其他事情。
大多数时候,一切都很好。但有时这些行会乱序显示。例如,代替预期的顺序 {0, 1, 2, 3, 4, 5, 6...},它将显示行 {5, 0, 2, 3, 4, 1, 6, ...}。这就像行以某种方式被“交换”。
我不知道为什么 - 是什么导致了这种行为。
当我在 Chrome 开发者工具中查看 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。等等。
问:任何想法为什么会发生这种情况?
问:对故障排除有什么建议吗?
先感谢您!