Update dom-select.js

Added option to sort select list in a dataTable using selected text.
pull/202/head
Somasekar-N 10 years ago
parent f204b280e6
commit beaca38f30

@ -14,3 +14,15 @@ $.fn.dataTable.ext.order['dom-select'] = function ( settings, col )
return $('select', td).val();
} );
};
/**
* @summary Sort based on the selected text of the `dt-tag select` options in a column
* @author [Somasekar N](somasekar.cse@gmail.com)
*/
$.fn.dataTable.ext.order['dom-select'] = function ( settings, col )
{
return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
return $('select :selected', td).val();
} );
};

Loading…
Cancel
Save