Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1077 from futuremint/repeater-list-fix-1075
Browse files Browse the repository at this point in the history
Bugfix for repeater list extension returning wrong rowData object in rowRenderer callback.
  • Loading branch information
Christopher McCulloh committed Feb 11, 2015
2 parents 79aeae7 + 1f540ed commit d71ec19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion js/repeater-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
this.viewOptions.list_rowRendered({
container: $tbody,
item: $row,
rowData: data
rowData: data.items[index]
}, function () {});
}
}
Expand Down
4 changes: 4 additions & 0 deletions test/repeater-list-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ define(function(require){
if(!hasCalled.column){
ok(1===1, 'columnRendered callback called upon rendering column');
equal((helpers.container.length>0 && helpers.item.length>0), true, 'columnRendered helpers object contains appropriate attributes');
equal((helpers.rowData instanceof Array), false, 'rowRendered rowData is an object');
equal((typeof helpers.rowData.appearance), 'string', 'rowRendered rowData is an item from the dataSource');
hasCalled.column = true;
}
num.cols++;
Expand All @@ -137,6 +139,8 @@ define(function(require){
list_rowRendered: function(helpers, callback){
if(!hasCalled.row){
ok(1===1, 'rowRendered callback called upon rendering column');
equal((helpers.rowData instanceof Array), false, 'rowRendered rowData is an object');
equal((typeof helpers.rowData.appearance), 'string', 'rowRendered rowData is an item from the dataSource');
equal((helpers.container.length>0 && helpers.item.length>0), true, 'rowRendered helpers object contains appropriate attributes');
hasCalled.row = true;
}
Expand Down

0 comments on commit d71ec19

Please sign in to comment.