Shiny and ColReorder, doesn't order by specified column after drag and drop

Code to reproduce the issue:

(shiny version 1.6.0, DT version 0.18)


ui <- fluidPage(

server <- function(input, output, session){
  output$tbl <- renderDT({
    datatable(mtcars, extensions = "ColReorder", 
              options = list(colReorder = TRUE)

shinyApp(ui, server)
  1. Click in a column header (for example qsec). Check that the order is correct.
  2. Drag the column to another position
  3. Click in the column header of the dragged column. Check that the order is incorrect.

It seems to me that it looses the right indexing when dragging and dropping. I have tried to run the datatable without Shiny and it works well.

Am I missing something?

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.