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

Bugfix for repeater list extension returning wrong rowData object in rowRenderer callback. #1077

Merged
merged 1 commit into from
Feb 11, 2015
Merged

Conversation

futuremint
Copy link
Contributor

Adds unit tests to both list callbacks to verify the shape of the rowData object now.
Fixes #1075.

@cmcculloh-kr cmcculloh-kr self-assigned this Feb 11, 2015
@cmcculloh-kr cmcculloh-kr added this to the 3.6.0 milestone Feb 11, 2015
@@ -379,7 +379,7 @@
this.viewOptions.list_rowRendered({
container: $tbody,
item: $row,
rowData: data
rowData: data.items[index]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be simplified to just subset[index] I was already passing in the correct "items" array as the subset arg, I just mistakingly put the wrong argument there >.<

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what even is subset? That variable name needs to change...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These docs will change soon, but: http://getfuelux.com/extensions.html#writing-extensions-repeater-helpers

It's the "subset" of information that is being iterated over. In this case, data.items. renderRow is called passing the helpers.subset value as the subset argument. I suppose it could be renamed "items" in the scope of the renderRow function...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any case where it isn't just a convenience accessor for the data.items param?

@kevinparkerson
Copy link
Contributor

Nice catch!!!

cmcculloh-kr pushed a commit that referenced this pull request Feb 11, 2015
Bugfix for repeater list extension returning wrong rowData object in rowRenderer callback.
@cmcculloh-kr cmcculloh-kr merged commit d71ec19 into ExactTarget:master Feb 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repeater: list_rowRendered issue
3 participants