mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
remove find from loop
theres no need to set ffxn in a loop, when having 4k rows with 8 columns as example then the jQuery find will execute 32000 times the setting of ffxn does not use cell data, so dont loop it
This commit is contained in:
parent
7bedd220a6
commit
793852c546
@ -4505,6 +4505,14 @@
|
||||
// look for multiple columns '1-3,4-6,8'
|
||||
tsf.multipleColumns( c, wo.filter_$anyMatch ) :
|
||||
[];
|
||||
|
||||
// in case select filter option has a different value vs text 'a - z|A through Z'
|
||||
ffxn = wo.filter_columnFilters ?
|
||||
c.$filters.add( wo.filter_$externalFilters )
|
||||
.filter( '[data-column="' + columnIndex + '"]' )
|
||||
.find( 'select option:selected' )
|
||||
.attr( 'data-function-name' ) || '' : '';
|
||||
|
||||
data.$cells = data.$row.children();
|
||||
data.matchedOn = null;
|
||||
if ( data.anyMatchFlag && columnIndex.length > 1 || ( data.anyMatchFilter && !hasAnyMatchInput ) ) {
|
||||
@ -4571,12 +4579,6 @@
|
||||
|
||||
result = showRow; // if showRow is true, show that row
|
||||
|
||||
// in case select filter option has a different value vs text 'a - z|A through Z'
|
||||
ffxn = wo.filter_columnFilters ?
|
||||
c.$filters.add( wo.filter_$externalFilters )
|
||||
.filter( '[data-column="' + columnIndex + '"]' )
|
||||
.find( 'select option:selected' )
|
||||
.attr( 'data-function-name' ) || '' : '';
|
||||
// replace accents - see #357
|
||||
if ( c.sortLocaleCompare ) {
|
||||
data.filter = ts.replaceAccents( data.filter );
|
||||
|
Loading…
Reference in New Issue
Block a user