Commit e17bbb42 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Pass root data object to rowfunction as 3rd parameter

parent e9259b30
......@@ -13,7 +13,7 @@ function TableRenderer(target, source, columns, options) {
this.paginate_firstlast = true;
this.statevars = ['offset','limit'];
this.emptycontent = false; // Something to display when no results are found
this.rowfunction = function(rowdata, rownumber) { return TR(); }
this.rowfunction = function(rowdata, rownumber, data) { return TR(); }
this.init = function() {
self.table = target;
......@@ -134,7 +134,7 @@ function TableRenderer(target, source, columns, options) {
var rownumber = 1;
forEach(data.data, function(row) {
var tr = self.rowfunction(row, rownumber++);
var tr = self.rowfunction(row, rownumber++, data);
if ( row._class ) { tr.className = row._class; }
if ( row._id ) { tr.id = row._id; }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment