MCPcopy Create free account
hub / github.com/breck7/scroll / _fnFilterComplete

Function _fnFilterComplete

external/.datatables.js:4063–4100  ·  view source on GitHub ↗

* Filter the table using both the global filter and column based filtering * @param {object} settings dataTables settings object * @param {object} input search information * @memberof DataTable#oApi

(settings, input)

Source from the content-addressed store, hash-verified

4061 * @memberof DataTable#oApi
4062 */
4063 function _fnFilterComplete(settings, input) {
4064 var columnsSearch = settings.aoPreSearchCols
4065
4066 // In server-side processing all filtering is done by the server, so no point hanging around here
4067 if (_fnDataSource(settings) != "ssp") {
4068 // Check if any of the rows were invalidated
4069 _fnFilterData(settings)
4070
4071 // Start from the full data set
4072 settings.aiDisplay = settings.aiDisplayMaster.slice()
4073
4074 // Global filter first
4075 _fnFilter(settings.aiDisplay, settings, input.search, input)
4076
4077 $.each(settings.searchFixed, function (name, term) {
4078 _fnFilter(settings.aiDisplay, settings, term, {})
4079 })
4080
4081 // Then individual column filters
4082 for (var i = 0; i < columnsSearch.length; i++) {
4083 var col = columnsSearch[i]
4084
4085 _fnFilter(settings.aiDisplay, settings, col.search, col, i)
4086
4087 $.each(settings.aoColumns[i].searchFixed, function (name, term) {
4088 _fnFilter(settings.aiDisplay, settings, term, {}, i)
4089 })
4090 }
4091
4092 // And finally global filtering
4093 _fnFilterCustom(settings)
4094 }
4095
4096 // Tell the draw function we have been filtering
4097 settings.bFiltered = true
4098
4099 _fnCallbackFire(settings, null, "search", [settings])
4100 }
4101
4102 /**
4103 * Apply custom filtering functions

Callers 3

_fnReDrawFunction · 0.85
.datatables.jsFile · 0.85
searchFnFunction · 0.85

Calls 7

_fnDataSourceFunction · 0.85
_fnFilterDataFunction · 0.85
_fnFilterFunction · 0.85
_fnFilterCustomFunction · 0.85
_fnCallbackFireFunction · 0.85
sliceMethod · 0.80
eachMethod · 0.80

Tested by

no test coverage detected