1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-11-29 11:24:10 +01:00

Dev fix: Sorting a filtered table was broken

- Because of the decoupling of the filtering and sorting, the filtering
  was missing that the indexes of the displayed data will have changed
  after a sort. So need to do a full filter when just sorted
This commit is contained in:
Allan Jardine 2013-10-09 14:57:34 +01:00
parent 8debb87477
commit bef8374eed
2 changed files with 5 additions and 3 deletions

View File

@ -1 +1 @@
277cf29e4569deac5b9692cf26f29baa1fe5e463
8583fb37f99549488c7d149a917459b1073aec01

View File

@ -2398,8 +2398,10 @@
if ( invalidated ||
force ||
prevSearch.length > input.length ||
input.indexOf(prevSearch) !== 0 )
{
input.indexOf(prevSearch) !== 0 ||
settings.bSorted // On resort, the display master needs to be
// re-filtered since indexes will have changed
) {
settings.aiDisplay = displayMaster.slice();
}