Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Fix for 151: Column searchablity can offset the column type index #203

Closed
wants to merge 1 commit into from

Conversation

pmorch
Copy link

@pmorch pmorch commented Jun 25, 2013

In function _fnBuildSearchRow(), aData[idx] incorrectly got investigated even if aoColumns[i].bSearchable was false.

(If you're reviewing this commit, imagine that aoColumns[i].length ==
10 and aData.length == 1 and the first and only i where
aoColumns[i].bSearchable is true is i== 5. You'll notice that e.g.
aData[8] also gets investigated)

History: First there was this commit:

commit 065c2cc66b872c6964b7d31f12941f23e7f1f171
Date:   Thu Nov 1 21:45:48 2012 +0000

    Fix: Filtering wasn't correctly applying the `type` adjustments needed for the global filter. For example this meant that html was not stripped from 'html' type columns, resulting in filtering being done on html tags/attributes as well as the content.

It fixed e.g. this issue:
"How to search only non html content - DataTables forums"
http://www.datatables.net/forums/discussion/13667/how-to-search-only-non-html-content/p1

However, it was buggy, and then this got committed.

commit f3ce2e2d44db8eb43750435c55eb2551b2c6019e
Date:   Sat Feb 16 11:27:41 2013 +0000

    Fix 151: Column type was being offset when columns were not searchable

However, that requires this commit to work properly.

…ndex

In function _fnBuildSearchRow(), aData[idx] incorrectly got investigated even if aoColumns[i].bSearchable was false.

(If you're reviewing this commit, imagine that aoColumns[i].length ==
10 and aData.length == 1 and the first and only i where
aoColumns[i].bSearchable is true is i== 5. You'll notice that e.g.
aData[8] also gets investigated)

History: First there was this commit:

    commit 065c2cc
    Date:   Thu Nov 1 21:45:48 2012 +0000

        Fix: Filtering wasn't correctly applying the `type` adjustments needed for the global filter. For example this meant that html was not stripped from 'html' type columns, resulting in filtering being done on html tags/attributes as well as the content.

It fixed e.g. this issue:
"How to search only non html content - DataTables forums"
http://www.datatables.net/forums/discussion/13667/how-to-search-only-non-html-content/p1

However, it was buggy, and then this got committed.

    commit f3ce2e2
    Date:   Sat Feb 16 11:27:41 2013 +0000

        Fix 151: Column type was being offset when columns were not searchable

However, that requires this commit to work properly.
@DataTables
Copy link
Collaborator

Hi - sorry for the delay in getting back to you! The _fnBuildSearchRow function has actually been removed in the 1_10_wip branch and I think this issue is actually slightly different to what your patch fixes in 1.10 wip now. The searchable parameter isn't actually being applied at all any more (an error on my part while refactoring).

I'll keep this issue open for the moment until I get a chance to fix it (currently setting up the new build system, so what to get that into place before putting in any other changes into DataTables).

@DataTables
Copy link
Collaborator

I've been a rubbish maintainer here... Sorry! I've just checked the 1.10 code base and it does follow the behaviour you suggest in this pull request. So going to close now.

@DataTables DataTables closed this Dec 8, 2014
@pmorch
Copy link
Author

pmorch commented Dec 8, 2014

I've been a rubbish maintainer here...

Don't sweat it. I'm sure you're doing what you can manage. I'm very grateful for what you do accomplish regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants