1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-06-01 21:42:20 +02:00

Updated 1.04 Paging (markdown)

koalyptus 2016-07-09 22:14:42 +10:00
parent 106c00e584
commit ab7e95c061

@ -250,4 +250,45 @@
<td><code>var tfConfig = { on_after_change_page: function(o,i){ alert(o.id+' - page index: '+i); }; }</code></td>
</tr>
</tbody>
</table>
## Events
<p>
Assuming <code>TableFilter</code> is already instanciated:
</p>
<pre>
var tf = new TableFilter('my-table-id');
</pre>
<table>
<thead>
<tr>
<th>Event</th>
<th>Description</th>
<th>Remarks</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<th>row-paged</th>
<td>Event emitted just after a row is included in a page during paging calculation</td>
<td>
Subscribers receives the following parameters:
<ul>
<li><code>tf</code> - current TableFilter instance</li>
<li><code>rowIdx</code> - index of row</li>
<li><code>validRowIdx</code> - index of valid rows collection</li>
<li><code>rowDisplayed</code> - boolean indicating if row is displayed</li>
</ul>
</td>
<td>
<pre>,
tf.emitter.on(['row-paged'], function(tf, rowIdx, validRowIdx, rowDisplayed){
console.log(tf, rowIdx, validRowIdx, rowDisplayed);
});
</pre>
</td>
</tr>
</tbody>
</table>