Closed matthias-a closed 4 years ago
With R render functions, all the content has to be generated upfront since the table is purely client-side and can't run R code on the fly. If server-side rendering is added in the future, then those sparklines could potentially be rendered lazily within a Shiny app.
So for now, if you want to render custom content lazily, you'll have to use a JavaScript render function (check out the custom rendering doc for a couple more details).
There's an example of rendering sparklines in JS here, which you might be able to adapt, although it uses a different library for sparklines: https://github.com/glin/reactable/issues/5#issuecomment-513570900
Thanks for your answer, the references are helpful!
Hi there and thanks a lot for this package! I tried to create a table with sparklines, similar to your example, but for a data set with a little more entries (~5,000 rows). Here, the rendering of the table gets very slow. Refer to the following code snippet:
Maybe I just use it in a wrong way or did not read well enough the documentation, but is there a way, that the rendering of the sparklines is done in a kind of lazy manner, e.g. when a new page is loaded? Same slow rendering happens when instead of sparklines, row details with plots are used. Do you have any idea? Thanks in advance!