Open keatonwilson opened 3 weeks ago
We have to drop f
from dom
options:
palmerpenguins::penguins |>
DT::datatable(
# Set filters to above columns
filter = "top",
options = list(
# drop f from dom
dom = 'ltpir',
# do not disable searching
searching = TRUE
)
)
https://datatables.net/reference/option/dom:
I understand now the contradictions in the datatable.net documentation (DT is on DataTables 1.10). I use for many years dom
.
Define the table control elements to appear on the page and in what order. Since: DataTables 1.10 Deprecated!
As of v2.0 this feature has been deprecated. This feature will be removed from version 3.0.
This option is superseded by the layout option in DataTables 2, which is far more flexible, intuitive and styling framework independent. Do not use this option for new projects, and actively update older projects to use layout rather than this option.
Thanks @philibe - appreciate the reply and documentation on the dom parameter - that's not something we've used extensively before, but very useful!
Problem
We recently encountered an issue when trying to create a table that has column-based filters but no table-wide search bar. Our initial approach was to create a table like the one below:
This successfully creates a table, but the column filters don't work. After some forum searching, we opted for an approach where we set
searching = TRUE
and then hide the full-table search bar via CSS:This works, but wondering if other users may run into the same issue - we didn't find any documentation around the interaction between these two parameters. Ideally, it would be a great to get some kind of warning indicating that column filters will display, but they're not functional in this situation - perhaps we missed it in our reading!
Thanks in advance!
Session Info
By filing an issue to this repo, I promise that
xfun::session_info('DT')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/DT')
.I understand that my issue may be closed if I don't fulfill my promises.