respect the bFilter option: when it is false, do not show the search boxes

This commit is contained in:
Yihui Xie
2014-02-20 18:21:36 -06:00
parent 7117f9e058
commit 88d2425ca3
2 changed files with 9 additions and 5 deletions

View File

@@ -385,7 +385,8 @@ dataTablesJSON <- function(data, query) {
with(parseQueryString(query), {
# global searching
i <- seq_len(n)
if (nzchar(sSearch)) {
sSearch <- getExists('sSearch', 'character')
if (length(sSearch) && nzchar(sSearch)) {
i0 <- apply(data, 2, function(x) grep(sSearch, as.character(x)))
i <- intersect(i, unique(unlist(i0)))
}