This is a sample of the jQuery.FilterTable plugin which illustrates the minRows option.
By default, the plugin will add filtering only to tables with at least 8 rows in the tbody. In this example, the table has more than the minimum rows, so filtering is added.
| Fruit | Mesocarp Color(s) When Ripe |
|---|---|
| Avocado | Green |
| Banana | Yellow |
| Dragon fruit | Pink, White |
| Guava | Pink |
| Lilikoʻi (Passion fruit) | Orange, Yellow |
| Lychee | White |
| Mango | Orange, Yellow |
| Papaya | Orange, Red, Yellow |
| Pineapple | White, Yellow |
| Star fruit | Green, White, Yellow |
$('.example-1').filterTable();
By default, the plugin will add filtering only to tables with at least 8 rows in the tbody. On a table with fewer than this minimum, no filtering is added.
| Fruit | Mesocarp Color(s) When Ripe |
|---|---|
| Avocado | Green |
| Banana | Yellow |
| Mango | Orange, Yellow |
| Papaya | Orange, Red, Yellow |
| Pineapple | White, Yellow |
$('.example-2').filterTable();
Setting the minRows option to 0 will always add filtering to a table, no matter how many rows the tbody contains.
| Fruit | Mesocarp Color(s) When Ripe |
|---|---|
| Avocado | Green |
| Banana | Yellow |
| Mango | Orange, Yellow |
| Papaya | Orange, Red, Yellow |
| Pineapple | White, Yellow |
$('.example-3').filterTable({
minRows: 0
});