Bug: filter text is always shown in input box, even when it shouldn't
Bug: filter text is always shown in input box, even when it shouldn't
Skarv1
Posts: 12Questions: 1Answers: 0
I am having difficulties with not showing the search string in the search field when using fnFilter, even with the correct parameter set to false. If I am not mistaken, it appears to be a bug with the recent DT versions.
As you can see, the old (1.9.4) version of DT works: http://jsfiddle.net/kV7Hy/24/
But the same code in the new version of DT does not: http://jsfiddle.net/kV7Hy/25/ - the filter text always appears.
This discussion has been closed.
Replies
Hi,
Yes, that's a bug - thanks for flagging it up. Unfortunately v1.10 does not have an option to not show the filter text which is why this crops up. It was removed as an option since I couldn't really see the point it in, as any value set would be immediately removed when the user types something into the input.
What I'll do for the moment is to add a note to the legacy documentation for fnFilter to note that this option will not work with v1.10. The current
search()
documentation makes no reference to that option (since it was removed).Allan
Aha, that's a shame, as I just found use for it! :) I would like to initially filter away different groups of elements for different users - giving them a "personalized" welcome screen, while these hidden elements would still appear via search/filtering. Without the ability of hiding the input text, this will be extremely ugly, since the users would face an input box stating " '^((?!'ElementsToHide+ ').)*$' . Could you please consider reimplementing this function, unless there's a different, more logical approach for me to follow?
I'll certainly add it to my list!
In the mean time, what you could do is use
search()
(or the old fnFilter method) to perform the search and then immediately use jQuery to remove the value that has been set in the input.Allan
Great, and thanks for the tip!