I was banging my head against the wall trying to understand the logic of the following section of code.
CODE
updateView: function() {
var arr = [];
for (var i = 0; i < (this.config.visibleRows * 2); i++) {
arr.push({
label: 'Button ' + (i + 1),
buttonNumber: i,
});
}
this.controls.listGrid.changeDataset(arr);
}
What made no sense is that visibleRows is set to 3. Why is it being multiplied by 2 which would create an array of 6 buttons when only 3 are visible? If you remove the multiplier you get the same exact results (3 visible buttons). So I finally came to the conclusion that this is simply a coding error in the sample widgets.
If I am wrong, please let me know. Otherwise, I will chalk this one up to wasted time.