mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-18 11:52:11 +01:00
Dev fix: Fix new filtering API which was incorrectly assinging undefined
values to the filtering operators
This commit is contained in:
parent
73d36854e3
commit
0b0fc5fe04
@ -3,20 +3,23 @@
|
||||
(/** @lends <global> */function() {
|
||||
|
||||
var _api = DataTable.Api;
|
||||
var _null_or_undefined = function ( param ) {
|
||||
return param === null || param === undefined;
|
||||
};
|
||||
|
||||
|
||||
_api.register( 'search()', function ( input, caseInsen, regex, smart ) {
|
||||
_api.register( 'search()', function ( input, regex, smart, caseInsen ) {
|
||||
return this.iterator( 'table', function ( settings ) {
|
||||
if ( ! settings.oFeatures.bFilter ) {
|
||||
return;
|
||||
}
|
||||
|
||||
_fnFilterComplete( settings, {
|
||||
_fnFilterComplete( settings, $.extend( {}, settings.oPreviousSearch, {
|
||||
"sSearch": input+"",
|
||||
"bRegex": regex === null ? false : regex,
|
||||
"bSmart": smart === null ? true : smart,
|
||||
"bCaseInsensitive": caseInsen === null ? true : caseInsen
|
||||
}, 1 );
|
||||
} ), 1 );
|
||||
} );
|
||||
} );
|
||||
|
||||
@ -24,7 +27,7 @@ _api.register( 'search()', function ( input, caseInsen, regex, smart ) {
|
||||
_api.register( [
|
||||
'columns().search()',
|
||||
'column().search()'
|
||||
], function ( input, caseInsen, regex, smart ) {
|
||||
], function ( input, regex, smart, caseInsen ) {
|
||||
return this.iterator( 'column', function ( settings, column ) {
|
||||
if ( ! settings.oFeatures.bFilter ) {
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user