-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to have the column formatting also apply to values shown in filter sliders? #247
Comments
That is a very good question. I did consider this in the past, and it was not very straightforward to implement. I'll try again in the future. Thanks! |
I am having the same problem in this moment and I saw this. I take advantage to ask about a similar problem. DT offer the possibility to use other column to order with "orderData" in "columnDefs". In my case column1 is order by column2 (this is hidden) because I am doing some modifications in the way of show column1. Can filters input support the same ? Can I indicate that filter in column1 must to work with data of column2 (the hidden column) ? Thanks in advance |
+1 to that That's a minimal example, which helps to reproduce the problem. runApp(
list(ui = fluidPage(
DT::dataTableOutput("mytable")
),
server = function(input, output, session) {
output$mytable <- DT::renderDataTable(
DT::datatable(iris*10,
options = list(pageLength = 10,
columnDefs = list(list(className = 'dt-left',
targets = 0:4))
),
filter = c("top")) %>%
formatRound(1:4, 0)
)
}
)
) |
👍 (A user tells me this today) Thanks in advance |
This is still a thing. Are the developers planning to fix this? |
No updates. Sorry. If gt or any other packages can do the job, yes, please consider using them. |
Great new! @mikmart has just helped implement this feature. You can try the development version: remotes::install_github('rstudio/DT') Thanks everyone! |
For example, I can use "formatPercentage" to format the values in a column to look like percentages (e.g. 2.50% (with "digits = 2") instead of 0.025), but the values shown on the filter slider still look unformatted (e.g. 0.025 instead of 2.50%).
The text was updated successfully, but these errors were encountered: