rdtxaringanremarkjs

How to stop xaringan's keyboard shortcuts while searching in a DT::datatable()?


xaringan's keyboard shortcuts interfere with DT::datatable() search functionality. It can even be seen in xaringan's example presentation (for instance, attempt to search for "m").

How can I stop this from happening? It is practically impossible to search for anything in a DT::datatable().


Solution

  • You can disable the keyboard shortcut by using frameWidget in widgetframe R package. Below is a working example.

    ```{r}
    library(widgetframe)
    library(DT)
    dt <-  datatable(iris)
    frameWidget(dt)
    ```