You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
# Create a table
palmerpenguins::penguins |>
DT::datatable(
options = list(
# Turn off top table-wide search bar
searching = FALSE
),
# Set filters to above columns
filter = "top"
)
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:
.dataTables_filter {
display: none;
}
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!
I have provided the necessary information about my issue.
If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included 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').
If I have posted the same issue elsewhere, I have also mentioned it in this issue.
I have learned the Github Markdown syntax, and formatted my issue correctly.
I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered:
palmerpenguins::penguins|>DT::datatable(
# Set filters to above columnsfilter="top",
options=list(
# drop f from domdom='ltpir',
# do not disable searchingsearching=TRUE
)
)
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.
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.
The text was updated successfully, but these errors were encountered: