Hello,
I'm seeing a problem in the latest nightly where I can't select the first node in a tree with checkboxes. You can recreate it by compiling this showcase page with the nightly. I believe the problem is this TreeGridBody method. When this.selectRecord(_2, _1) is called, _1 is the index of the row. Further down the stack, that arg gets reused as a boolean, and if it's false (which happens if the index is 0), the method returns early and the row isn't selected. The code that the showcase is currently using calls this.selectRecord(_2), which works fine.
SmartClient Version: SNAPSHOT_v12.1d_2019-01-31/LGPL Development Only (built 2019-01-31)
Thanks,
John
I'm seeing a problem in the latest nightly where I can't select the first node in a tree with checkboxes. You can recreate it by compiling this showcase page with the nightly. I believe the problem is this TreeGridBody method. When this.selectRecord(_2, _1) is called, _1 is the index of the row. Further down the stack, that arg gets reused as a boolean, and if it's false (which happens if the index is 0), the method returns early and the row isn't selected. The code that the showcase is currently using calls this.selectRecord(_2), which works fine.
Code:
isc.A.mouseDown = function isc_TreeGridBody_mouseDown() { var _1 = this.getEventRow() , _2 = _1 < 0 ? null : this.grid.data.get(_1); if (_2 != null) { if (this.grid.clickInOpenArea(_2)) { return isc.EH.STOP_BUBBLING } else if (this.grid.clickInCheckboxArea(_2) && this.canSelectRecord(_2)) { var _3 = this.grid.selectionType; if (_3 == isc.Selection.SINGLE) { this.deselectAllRecords(); this.selectRecord(_2) } else if (_3 == isc.Selection.SIMPLE || _3 == isc.Selection.MULTIPLE) { if (this.selectionManager.isSelected(_2, _1)) { this.deselectRecord(_2, _1) } else { this.selectRecord(_2, _1) } } return isc.EH.STOP_BUBBLING } } return this.Super("mouseDown", arguments) } //Further down the stack, see comment below. isc.A.selectList = function isc_Selection_selectList(_1, _2, _3, _4, _5) { if (_2 == null) _2 = true; if (!_1) return false; if (this.$q7) this.cacheSelection(); var _6 = this.$27q; var _7 = _1.getLength(); if (_3 == null) { _3 = []; var _8 = this.getItemList(); var _9 = false , _10 = null , _11 = null; if (_4 != null) { _11 = _4.getDataSource(); _10 = _11 && _11.getPrimaryKeyFields(); if (_10 && isc.isA.emptyObject(_10)) _10 = null } if (this.accessResultSetCache && isc.isA.ResultSet(_8)) { _9 = true; _8 = _8.localData || [] } for (var i = 0; i < _7; i++) { var _13 = _1.get(i) , _14 = this.isSelected(_13, i) , _15 = null; if (_14 == _2) //When _2 == 0 and the checkbox is not already selected, this is true. continue; if (isc.MultiLinkSelection && isc.isA.MultiLinkSelection(this)) { this.$102q(_13.openListIndex != null); _15 = _8[_13.openListIndex] } else if (_10) { var _16 = _11 && _11.filterPrimaryKeyFields(_13); if (_16) { _15 = _8.findIndex(_16); if (_15 >= 0) _13 = _8[_15] } } else { _15 = _8.fastIndexOf(_13) } if ((_15 == null || _15 == -1) && !_5) { continue } if (this.$1596(_13)) _3[_3.length] = _13 } } else { if (_6 === _3) _3 = _3.duplicate() } var _17 = false , _7 = _3.length; var _18 = this.$134v; this.$134v = true; var _19 = this.$915; this.$915 = _7 > 1 ? true : false; if (_7 > 0) this.$156b = null; for (var i = 0; i < _7; i++) { var _13 = _3[i]; if (_2) { _6[_6.length] = _13 } else { _6.remove(_13) } _17 = this.setSelected(_13, _2) || _17 } this.$134v = _18; if (this.cascadeSelection) { if (this.$q7) this.cacheSelection() } else { this.$q7 = false } this.$915 = _19; return _17 }
Thanks,
John
Comment