Skip to content

Commit

Permalink
Merge pull request #9 from elliottsj/footer
Browse files Browse the repository at this point in the history
Add footer label support via a `footerLabel` prop
  • Loading branch information
Pavlo Aksonov committed Sep 6, 2015
2 parents 9171da5 + 4c910ca commit 466480e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions RCTTableView/RCTTableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ -(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteg
return _sections[section][@"label"];
}

-(NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section {
return _sections[section][@"footerLabel"];
}

-(NSMutableDictionary *)dataForRow:(NSInteger)row section:(NSInteger)section {
return (NSMutableDictionary *)_sections[section][@"items"][row];
}
Expand Down
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ var TableView = React.createClass({
}

});
sections.push({label:section.props.label, items: items, count: count});
sections.push({
label: section.props.label,
footerLabel: section.props.footerLabel,
items: items,
count: count
});
}
if (section.type==TableView.Item){
var el = clone(section.props);
Expand Down

0 comments on commit 466480e

Please sign in to comment.