See Section 2 at
http://rstudio.github.io/DT/server.html for an
example of what I meant by a skeleton of the data. Basically it is a
zero-row data frame with a few columns. The columns of the data frame
should match what you expect to return from the DataTables query.
That example was based on PHP. For R, your dataTablesFilterCustom is
completely up to you -- it is just a function with two arguments, and
you can do whatever you want inside the function, e.g. (pseudo code)
dataTableAjax(... filter = function(data, params) {
# the data argument in this case may be meaningless
list(
draw = ...,
data = sqlFetch("select whatever from database where this like
that limit 0,10"),
....
)
})
Please take a look at the dataTablesFiler() function in DT:
https://github.com/rstudio/DT/blob/master/R/shiny.R
Regards,
Yihui
> --
> You received this message because you are subscribed to the Google Groups
> "Shiny - Web Framework for R" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
shiny-discus...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/shiny-discuss/79d5fc2b-485c-49f6-8553-23dd995d48d3%40googlegroups.com.
>
> For more options, visit
https://groups.google.com/d/optout.