4

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(). Thanks in advance!

Yihui Xie
  • 26,509
  • 22
  • 178
  • 407
arcruz0
  • 163
  • 7

1 Answers1

5

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)
```
Emi
  • 3,484
  • 6
  • 11
  • 1
    this is a nice workaround, but then all the CSS gets lost. It would be nice if there was an actual way to disable xaringan's keyboard shortcuts – giocomai Oct 26 '18 at 08:20
  • 2
    Yes, I agree that it would be nice to have an easier way to disable keyboard shortcuts for some specified slides. This is a limitation more on `remark.js` rather than `xaringan` though. Perhaps upvote/comment [here](https://github.com/gnab/remark/issues/544) to get some attention from the developers there? – Emi Oct 29 '18 at 05:07