diff --git a/docs/index.html b/docs/index.html index 64ef7ac1..19a9fb9c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -7908,6 +7908,7 @@ var index, len, $table = $('table'), column = 0, // first column onlyAvail = false, // if true, available rows (visible rows after filtering) are returned + // arry is an array of all text content from a table column; duplicate entries are included! array = $.tablesorter.filter.getOptions( $table, column, onlyAvail ); // process array; sort & remove duplicates (added v2.23.4) @@ -7925,6 +7926,38 @@ $('select.external').html( opts ); +
filter_useParsedData
option, "filter-parsed"
class on the header, and the parser parsed
flag settinng (ref).
+ Use it as follows:
+$.tablesorter.filter.getOptionSource( table, column, onlyAvail );+
table
- table DOM element (or jQuery object) of table.column
- zero-based column index.onlyAvail
- an optional boolean flag, which will be ignored if the options
parameter is defined or is an empty string; otherwise it is the value passed to the function which finds all table column values; if true
, only the available options will be diplayed.// external filter select +var index, len, + opts = '', + $table = $('table'), + column = 0, // first column + onlyAvail = false, // if true, available rows (visible rows after filtering) are returned + // arry is an array of objects [{ text: "Foo", parsed: "foo" }, ...] with duplicates entries removed + arry = $.tablesorter.filter.getOptionSource( $table, column, onlyAvail ); + +// build options +for ( index = 0; index < len; index++ ) { + opts += '<option value="' + array[ index ].parsed + '">' + array[ index ].text + '</option>'; +} +$('select.external').html( opts );+
Please be aware that this function is different from the getOptions
filter function in that an object is returned.