DataTables uses column formatting to filter

When creating a datatable with filter = 'top' , and also using the format function in a column, formatting is not applied to the filter control for that column. Is there a way to format filter controls?

For example, if I have floating point numbers formatted as a percentage, the slider in the filter still shows floating point numbers.

 library(DT) my_data <- mtcars my_data$wt_pctile <- trunc(rank(my_data$wt)) / length(my_data$wt) datatable(my_data, filter = 'top') %>% formatPercentage('wt_pctile') 

The percentage range of filters is not formatted as a percentage

+5
source share

Source: https://habr.com/ru/post/1272290/


All Articles