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

Function _fnReDraw

external/.datatables.js:3243–3275  ·  view source on GitHub ↗

* Redraw the table - taking account of the various features which are enabled * @param {object} oSettings dataTables settings object * @param {boolean} [holdPosition] Keep the current paging position. By default * the paging is reset to the first page * @memberof DataTable#oApi

(settings, holdPosition, recompute)

Source from the content-addressed store, hash-verified

3241 * @memberof DataTable#oApi
3242 */
3243 function _fnReDraw(settings, holdPosition, recompute) {
3244 var features = settings.oFeatures,
3245 sort = features.bSort,
3246 filter = features.bFilter
3247
3248 if (recompute === undefined || recompute === true) {
3249 // Resolve any column types that are unknown due to addition or invalidation
3250 _fnColumnTypes(settings)
3251
3252 if (sort) {
3253 _fnSort(settings)
3254 }
3255
3256 if (filter) {
3257 _fnFilterComplete(settings, settings.oPreviousSearch)
3258 } else {
3259 // No filtering, so we want to just use the display master
3260 settings.aiDisplay = settings.aiDisplayMaster.slice()
3261 }
3262 }
3263
3264 if (holdPosition !== true) {
3265 settings._iDisplayStart = 0
3266 }
3267
3268 // Let any modules know about the draw hold position state (used by
3269 // scrolling internally)
3270 settings._drawHold = holdPosition
3271
3272 _fnDraw(settings)
3273
3274 settings._drawHold = false
3275 }
3276
3277 /*
3278 * Table is empty - create a row with an empty message in it

Callers 4

_fnInitialiseFunction · 0.85
_fnSortAttachListenerFunction · 0.85
.datatables.jsFile · 0.85
__reloadFunction · 0.85

Calls 5

_fnColumnTypesFunction · 0.85
_fnSortFunction · 0.85
_fnFilterCompleteFunction · 0.85
_fnDrawFunction · 0.85
sliceMethod · 0.80

Tested by

no test coverage detected