mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-10-08 13:44:18 +00:00
Filter: keep parent match when no child rows match. See #1020
This commit is contained in:
parent
f7b9e1f914
commit
0ebb9ea219
8
dist/js/jquery.tablesorter.combined.js
vendored
8
dist/js/jquery.tablesorter.combined.js
vendored
@ -3835,7 +3835,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var len, norm_rows, rowData, $rows, $row, rowIndex, tbodyIndex, $tbody, columnIndex,
|
var len, norm_rows, rowData, $rows, $row, rowIndex, tbodyIndex, $tbody, columnIndex,
|
||||||
isChild, childRow, lastSearch, showRow, time, val, indx,
|
isChild, childRow, lastSearch, showRow, showParent, time, val, indx,
|
||||||
notFiltered, searchFiltered, query, injected, res, id, txt,
|
notFiltered, searchFiltered, query, injected, res, id, txt,
|
||||||
storedFilters = $.extend( [], filters ),
|
storedFilters = $.extend( [], filters ),
|
||||||
regex = tsf.regex,
|
regex = tsf.regex,
|
||||||
@ -4023,7 +4023,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
showRow = false;
|
showRow = false;
|
||||||
val = tsf.processRow( c, data, vars );
|
showParent = tsf.processRow( c, data, vars );
|
||||||
|
// don't pass reference to val
|
||||||
|
val = showParent ? true : false;
|
||||||
childRow = rowData.$row.filter( ':gt( 0 )' );
|
childRow = rowData.$row.filter( ':gt( 0 )' );
|
||||||
if ( wo.filter_childRows && childRow.length ) {
|
if ( wo.filter_childRows && childRow.length ) {
|
||||||
if ( !wo.filter_childWithSibs ) {
|
if ( !wo.filter_childWithSibs ) {
|
||||||
@ -4044,6 +4046,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// keep parent row match even if no child matches... see #1020
|
||||||
|
showRow = showRow || showParent;
|
||||||
} else {
|
} else {
|
||||||
showRow = val;
|
showRow = val;
|
||||||
}
|
}
|
||||||
|
4
dist/js/jquery.tablesorter.combined.min.js
vendored
4
dist/js/jquery.tablesorter.combined.min.js
vendored
File diff suppressed because one or more lines are too long
8
dist/js/jquery.tablesorter.widgets.js
vendored
8
dist/js/jquery.tablesorter.widgets.js
vendored
@ -1491,7 +1491,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var len, norm_rows, rowData, $rows, $row, rowIndex, tbodyIndex, $tbody, columnIndex,
|
var len, norm_rows, rowData, $rows, $row, rowIndex, tbodyIndex, $tbody, columnIndex,
|
||||||
isChild, childRow, lastSearch, showRow, time, val, indx,
|
isChild, childRow, lastSearch, showRow, showParent, time, val, indx,
|
||||||
notFiltered, searchFiltered, query, injected, res, id, txt,
|
notFiltered, searchFiltered, query, injected, res, id, txt,
|
||||||
storedFilters = $.extend( [], filters ),
|
storedFilters = $.extend( [], filters ),
|
||||||
regex = tsf.regex,
|
regex = tsf.regex,
|
||||||
@ -1679,7 +1679,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
showRow = false;
|
showRow = false;
|
||||||
val = tsf.processRow( c, data, vars );
|
showParent = tsf.processRow( c, data, vars );
|
||||||
|
// don't pass reference to val
|
||||||
|
val = showParent ? true : false;
|
||||||
childRow = rowData.$row.filter( ':gt( 0 )' );
|
childRow = rowData.$row.filter( ':gt( 0 )' );
|
||||||
if ( wo.filter_childRows && childRow.length ) {
|
if ( wo.filter_childRows && childRow.length ) {
|
||||||
if ( !wo.filter_childWithSibs ) {
|
if ( !wo.filter_childWithSibs ) {
|
||||||
@ -1700,6 +1702,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// keep parent row match even if no child matches... see #1020
|
||||||
|
showRow = showRow || showParent;
|
||||||
} else {
|
} else {
|
||||||
showRow = val;
|
showRow = val;
|
||||||
}
|
}
|
||||||
|
4
dist/js/jquery.tablesorter.widgets.min.js
vendored
4
dist/js/jquery.tablesorter.widgets.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/widgets/widget-filter.min.js
vendored
2
dist/js/widgets/widget-filter.min.js
vendored
File diff suppressed because one or more lines are too long
@ -3841,7 +3841,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var len, norm_rows, rowData, $rows, $row, rowIndex, tbodyIndex, $tbody, columnIndex,
|
var len, norm_rows, rowData, $rows, $row, rowIndex, tbodyIndex, $tbody, columnIndex,
|
||||||
isChild, childRow, lastSearch, showRow, time, val, indx,
|
isChild, childRow, lastSearch, showRow, showParent, time, val, indx,
|
||||||
notFiltered, searchFiltered, query, injected, res, id, txt,
|
notFiltered, searchFiltered, query, injected, res, id, txt,
|
||||||
storedFilters = $.extend( [], filters ),
|
storedFilters = $.extend( [], filters ),
|
||||||
regex = tsf.regex,
|
regex = tsf.regex,
|
||||||
@ -4029,7 +4029,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
showRow = false;
|
showRow = false;
|
||||||
val = tsf.processRow( c, data, vars );
|
showParent = tsf.processRow( c, data, vars );
|
||||||
|
// don't pass reference to val
|
||||||
|
val = showParent ? true : false;
|
||||||
childRow = rowData.$row.filter( ':gt( 0 )' );
|
childRow = rowData.$row.filter( ':gt( 0 )' );
|
||||||
if ( wo.filter_childRows && childRow.length ) {
|
if ( wo.filter_childRows && childRow.length ) {
|
||||||
if ( !wo.filter_childWithSibs ) {
|
if ( !wo.filter_childWithSibs ) {
|
||||||
@ -4050,6 +4052,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// keep parent row match even if no child matches... see #1020
|
||||||
|
showRow = showRow || showParent;
|
||||||
} else {
|
} else {
|
||||||
showRow = val;
|
showRow = val;
|
||||||
}
|
}
|
||||||
|
@ -1497,7 +1497,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var len, norm_rows, rowData, $rows, $row, rowIndex, tbodyIndex, $tbody, columnIndex,
|
var len, norm_rows, rowData, $rows, $row, rowIndex, tbodyIndex, $tbody, columnIndex,
|
||||||
isChild, childRow, lastSearch, showRow, time, val, indx,
|
isChild, childRow, lastSearch, showRow, showParent, time, val, indx,
|
||||||
notFiltered, searchFiltered, query, injected, res, id, txt,
|
notFiltered, searchFiltered, query, injected, res, id, txt,
|
||||||
storedFilters = $.extend( [], filters ),
|
storedFilters = $.extend( [], filters ),
|
||||||
regex = tsf.regex,
|
regex = tsf.regex,
|
||||||
@ -1685,7 +1685,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
showRow = false;
|
showRow = false;
|
||||||
val = tsf.processRow( c, data, vars );
|
showParent = tsf.processRow( c, data, vars );
|
||||||
|
// don't pass reference to val
|
||||||
|
val = showParent ? true : false;
|
||||||
childRow = rowData.$row.filter( ':gt( 0 )' );
|
childRow = rowData.$row.filter( ':gt( 0 )' );
|
||||||
if ( wo.filter_childRows && childRow.length ) {
|
if ( wo.filter_childRows && childRow.length ) {
|
||||||
if ( !wo.filter_childWithSibs ) {
|
if ( !wo.filter_childWithSibs ) {
|
||||||
@ -1706,6 +1708,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// keep parent row match even if no child matches... see #1020
|
||||||
|
showRow = showRow || showParent;
|
||||||
} else {
|
} else {
|
||||||
showRow = val;
|
showRow = val;
|
||||||
}
|
}
|
||||||
|
@ -1123,7 +1123,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var len, norm_rows, rowData, $rows, $row, rowIndex, tbodyIndex, $tbody, columnIndex,
|
var len, norm_rows, rowData, $rows, $row, rowIndex, tbodyIndex, $tbody, columnIndex,
|
||||||
isChild, childRow, lastSearch, showRow, time, val, indx,
|
isChild, childRow, lastSearch, showRow, showParent, time, val, indx,
|
||||||
notFiltered, searchFiltered, query, injected, res, id, txt,
|
notFiltered, searchFiltered, query, injected, res, id, txt,
|
||||||
storedFilters = $.extend( [], filters ),
|
storedFilters = $.extend( [], filters ),
|
||||||
regex = tsf.regex,
|
regex = tsf.regex,
|
||||||
@ -1311,7 +1311,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
showRow = false;
|
showRow = false;
|
||||||
val = tsf.processRow( c, data, vars );
|
showParent = tsf.processRow( c, data, vars );
|
||||||
|
// don't pass reference to val
|
||||||
|
val = showParent ? true : false;
|
||||||
childRow = rowData.$row.filter( ':gt( 0 )' );
|
childRow = rowData.$row.filter( ':gt( 0 )' );
|
||||||
if ( wo.filter_childRows && childRow.length ) {
|
if ( wo.filter_childRows && childRow.length ) {
|
||||||
if ( !wo.filter_childWithSibs ) {
|
if ( !wo.filter_childWithSibs ) {
|
||||||
@ -1332,6 +1334,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// keep parent row match even if no child matches... see #1020
|
||||||
|
showRow = showRow || showParent;
|
||||||
} else {
|
} else {
|
||||||
showRow = val;
|
showRow = val;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user