mirror of
https://github.com/koalyptus/TableFilter.git
synced 2024-06-29 02:40:15 +02:00
Updated 1.05 Drop down filter (markdown)
parent
821a0e758b
commit
aefde03d1a
|
@ -128,3 +128,77 @@
|
|||
</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>before-populating-filter</th>
|
||||
<td>Event emitted just before starting populating a filter</td>
|
||||
<td>
|
||||
Subscribers receive the following parameters:
|
||||
<ul>
|
||||
<li><code>tf</code> - current TableFilter instance</li>
|
||||
<li><code>colIndex</code> - index of the filter's column</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
tf.emitter.on(['before-populating-filter'], function(tf, colIndex){
|
||||
console.log(tf, colIndex);
|
||||
});
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>after-populating-filter</th>
|
||||
<td>Event emitted when the filter is populated</td>
|
||||
<td>
|
||||
Subscribers receive the following parameters:
|
||||
<ul>
|
||||
<li><code>tf</code> - current TableFilter instance</li>
|
||||
<li><code>colIndex</code> - index of the filter's column</li>
|
||||
<li><code>element</code> - filter's DOM element</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
tf.emitter.on(['after-populating-filter'], function(tf, colIndex, element){
|
||||
console.log(tf, colIndex, element);
|
||||
});
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>filter-focus</th>
|
||||
<td>Event emitted when a filter receives focus</td>
|
||||
<td>
|
||||
Subscribers receive the following parameters:
|
||||
<ul>
|
||||
<li><code>tf</code> - current TableFilter instance</li>
|
||||
<li><code>element</code> - filter's DOM element</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<pre>
|
||||
tf.emitter.on(['filter-focus'], function(tf, element){
|
||||
console.log(tf, element);
|
||||
});
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
Loading…
Reference in a new issue