I have implemented the following shiny table, where users can filter the whole table or specific columns. However, while the smart search works for the search of the whole table, I can't enable the smart search for the columns. Could someone please give me a hint what I can do to enable smart search also for the columns? Thank you in advance.
output$shiny_table =
DT::renderDT({
# Show the filtered data table
DT::datatable(
# Call the filtered table as function
data = table_filtered(),
# Load and include extension modules
extensions = c("FixedHeader"),
# Each column has its own search box
filter = list(position = "top",
clear = TRUE,
plain = TRUE),
# Further options
options = list(
# Mark found search terms
searchHighlight = TRUE,
search = list(smart = TRUE, regex = TRUE, caseInsensitive = TRUE),
# Special column properties
columnDefs = list(
# For specific columns: enable smart search
list(targets = c("Title", "Authors", "Journal"),
search = list(smart = TRUE, regex = TRUE, caseInsensitive = TRUE)),
# For specific columns: hide the search fields
list(targets = c(" ", "Year", "Type", "Citations", "DOI"),
searchable = FALSE)
)
)
)
}, server = TRUE)