-
Bug
-
Resolution: Fixed
-
Normal
-
9.1.0
-
Security Level: Jimmy
-
ZK 9.5.0 S1
-
None
Steps to Reproduce
https://zkfiddle.org/sample/2cifl1i/1-Large-tree-with-treefoot-but-no-treecols-cause-JS-error
click the button to add rows
Current Result
Uncaught TypeError: Cannot read property 'cells' of undefined at _cpCellWd (zul.mesh.wpd:364) at init._calcSize (zul.mesh.wpd:1216) at init.onSize (zul.mesh.wpd:1109) at init.$supers (zk.wpd:12956) at init.onSize (zul.sel.wpd:3938) at init.onSize (zk.wpd:46082) at _invoke (zk.wpd:16465) at init.fire (zk.wpd:16448) at _fire (zk.wpd:16591) at Object.fireDown (zk.wpd:16808)
Expected Result
calculation doesn't cause error
Debug Information
srcrows contains loaded rows only, but wgt.getBodyWidgetIterator provide all items (including unloaded items).
_cpCellWd is only invoked when there is no treecol
Workaround
Add an empty treecol to the tree
<treecols style="visibility: collapse"> <treecols style="visibility: collapse"> <treecol /> </treecols>