RagGrid
RagGrid copied to clipboard
renderValue needs to empty element before rendering a new one
If you render a RagGrid from a reactive expression then the RagGrid renders multiple times.
The HTML element needs clearing inside renderValue
See what DT does on: https://github.com/rstudio/DT/blob/cd8e49fa69ddb786974fb661c275b780adcbebf9/inst/htmlwidgets/datatables.js#L117
See also a question/answer on https://stackoverflow.com/questions/44348963/replace-existing-r-shiny-htmlwidget-data-with-new-data