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() {
|
(/** @lends <global> */function() {
|
||||||
|
|
||||||
var _api = DataTable.Api;
|
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 ) {
|
return this.iterator( 'table', function ( settings ) {
|
||||||
if ( ! settings.oFeatures.bFilter ) {
|
if ( ! settings.oFeatures.bFilter ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_fnFilterComplete( settings, {
|
_fnFilterComplete( settings, $.extend( {}, settings.oPreviousSearch, {
|
||||||
"sSearch": input+"",
|
"sSearch": input+"",
|
||||||
"bRegex": regex === null ? false : regex,
|
"bRegex": regex === null ? false : regex,
|
||||||
"bSmart": smart === null ? true : smart,
|
"bSmart": smart === null ? true : smart,
|
||||||
"bCaseInsensitive": caseInsen === null ? true : caseInsen
|
"bCaseInsensitive": caseInsen === null ? true : caseInsen
|
||||||
}, 1 );
|
} ), 1 );
|
||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
@ -24,7 +27,7 @@ _api.register( 'search()', function ( input, caseInsen, regex, smart ) {
|
|||||||
_api.register( [
|
_api.register( [
|
||||||
'columns().search()',
|
'columns().search()',
|
||||||
'column().search()'
|
'column().search()'
|
||||||
], function ( input, caseInsen, regex, smart ) {
|
], function ( input, regex, smart, caseInsen ) {
|
||||||
return this.iterator( 'column', function ( settings, column ) {
|
return this.iterator( 'column', function ( settings, column ) {
|
||||||
if ( ! settings.oFeatures.bFilter ) {
|
if ( ! settings.oFeatures.bFilter ) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user