title: Get column names of rendered DT table
body: <p>I took over a project that uses some tidy function to drop empty/ugly columns before rendering with <code>DT::renderDT()</code>. A cell value in a given column may represent another table and I would like to link to these. So if a user click a cell, the app should render another table of that name. However, cell values are only uniquely related to other tables in context of column names.<code>input$tbl_cell_clicked</code> only provides index and not column names. The tidying function may remove empty columns, so I cannot rely on index numbers. </p>
  
  <p>How do I get the current rendered column names of the table?</p>
  
  <pre><code>  library(shiny)
    library(DT)
    shinyApp(
      ui = fluidPage(fluidRow(column(12, DTOutput('tbl')))),
      server = function(input, output) {
        output$tbl = renderDT(
  
          #I took over a project that uses some tidy functions to drop empty/ugly columns before rendering
  
          #column names and order therefore cannot be guranteed, here exemplified with use of sample()
          iris[,sample(ncol(iris),3)], options = list(lengthChange = FALSE)
        )
  
        #i need to know the cell value and column name of latest click gesture, not only index col
        observe({
  
          #how can I retrieve the column name that cell clicked was in?
          print(input$tbl_cell_clicked)
  
          #The rendered table iris[,sample(ncol(iris))] cannot be scoped from here
  
          #Don't wanna go down that road of &lt;&lt;- solutions
          #could be solved by dumping latest iris[,sample(ncol(iris),3)] into a reactive values,
          #but that might look messy to use extra lines to save metadata from latest rendered DT
  
  
        })
      }
    )
  </code></pre>