MCPcopy Create free account
hub / github.com/OpenIntroStat/ims / updateTableInfo

Function updateTableInfo

libs/datatables-binding-0.18/datatables.js:1243–1261  ·  view source on GitHub ↗
(e, settings)

Source from the content-addressed store, hash-verified

1241
1242 // expose some table info to Shiny
1243 var updateTableInfo = function(e, settings) {
1244 // TODO: is anyone interested in the page info?
1245 // changeInput('page_info', table.page.info());
1246 var updateRowInfo = function(id, modifier) {
1247 var idx;
1248 if (server) {
1249 idx = modifier.page === 'current' ? DT_rows_current : DT_rows_all;
1250 } else {
1251 var rows = table.rows($.extend({
1252 search: 'applied',
1253 page: 'all'
1254 }, modifier));
1255 idx = addOne(rows.indexes().toArray());
1256 }
1257 changeInput('rows' + '_' + id, idx);
1258 };
1259 updateRowInfo('current', {page: 'current'});
1260 updateRowInfo('all', {});
1261 }
1262 table.on('draw.dt', updateTableInfo);
1263 updateTableInfo();
1264

Callers 1

datatables.jsFile · 0.85

Calls 1

updateRowInfoFunction · 0.85

Tested by

no test coverage detected