rdrr-io / rdrr-issues

rdrr.io issues
34 stars 7 forks source link

ShinyWidgets::NoUiSliderInput breaks the filters of DT tables #90

Closed derekzoutendijk closed 3 years ago

derekzoutendijk commented 3 years ago

Hi,

I found that there is an issue when combining the NoUiSliderInput together with datatables from the DT package. The reason seems to be that the DT also uses NoUiSliders as part of it's filter if the column is numeric. Consider the below application as reproduction. The filter of the datatable does not work. When you remove the noUISliderInput, the datatable works again.

basic usage ----

library( shiny ) library( shinyWidgets )

ui <- fluidPage(

tags$br(),

noUiSliderInput( inputId = "noui12345", ), verbatimTextOutput(outputId = "res1"),

DTOutput('testDT')

)

server <- function(input, output, session) { df = data.frame(com = c("A", "B", "C"), lon = c(31.043515, 31.029080, 31.002896), lat = c(-29.778562, -29.795506, -29.836168), time = as.POSIXct(c("2020-03-18 07:56:59","2020-03-18 12:28:58","2020-03-18 18:24:52")))

output$res1 <- renderPrint(input$noui12345) output$testDT <- renderDT({df %>% datatable( rownames = FALSE, editable = TRUE, class = 'stripe', escape = FALSE, filter = 'top') })

}

shinyApp(ui, server)

ihowson commented 3 years ago

Thanks for getting in touch!

This issue tracker is just for website issues. We're not able to provide technical support for individual packages. Sorry!