Skip to content
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

Filter not working properly with FixedColumns #422

Closed
tillschwoerer opened this issue Jun 2, 2017 · 1 comment
Closed

Filter not working properly with FixedColumns #422

tillschwoerer opened this issue Jun 2, 2017 · 1 comment
Labels
Milestone

Comments

@tillschwoerer
Copy link

Hi,

in my shiny app I want to fix the first column when scrolling horizontally, but still be able to filter this column. At first glance this is not working at all:

bildschirmfoto 2017-06-02 um 09 38 27

When scrolling, the filter is moving left, away from the corresponding column. This filter is now working. However, when scrolling even further this filter disappears:

bildschirmfoto 2017-06-02 um 09 40 58

This is the code which produces this behaviour:

library(shiny)
library(DT)
library(data.table)

shinyApp(
  ui = fluidPage(
    
    fluidRow(column(6, DT::dataTableOutput("testDT")))
    
  ),
  
  server = function(input, output, session) {
    
    output$testDT <- DT::renderDataTable({
      
      mtcars <- mtcars
      mtcars <- setDT(mtcars, keep.rownames = TRUE)
      datatable(mtcars
                ,extensions =  c('FixedColumns')
                ,filter='top'
                ,options=list(
                  fixedColumns = list(leftColumns=2)
                  ,autoWidth = T
                  ,scrollX = TRUE
                  ,columnDefs = list(list(width=100,targets=c(0:ncol(mtcars))))
                  
                )
      )
      
    })
    
  })
@yihui
Copy link
Member

yihui commented Jan 5, 2018

This is similar to #275, and I'm unable to fix it. Sorry!

@yihui yihui added this to the v0.3 milestone Jan 5, 2018
@yihui yihui added the wontfix label Jan 5, 2018
@yihui yihui closed this as completed in e2343df Jan 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants