You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First: DT is a great and mature package I love and use lot - thank´s for that 🎉
One major drawback I´ve noticed when applying custom renderings on cell content. DT has some predefined format*() functions which are useful for specific cases. If I want a different cell output (icons, badges, tooltips, ...) things get quiet uncomfortable.
Either I can use R and format the input data upfront using all the great tools like htmltools, fontawesome, ... (This feels unclean to me, as DT should be responsible for the cell formatting/ styling and not the "raw input data") or I have to go to the JavaScript side of things, which is ok but takes me outside of R.
Recently I took a look at reactable and fell in love with their concept of custom cell rendering. Here´s a short example:
Input data and cell rendering/ content-styling are cleanly separated
An R-Function can be used for rendering/ styling (taking cell value, row index, and column name as arguments)
At the moment DT has a very similar feature options$columnDefs$render that only supports JS-Functions. I think it would be great to expand this to regular R-Functions. It would add endless flexibility to custom cell-rendering with an clean and easy to use interface.
I have provided the necessary information about my issue.
If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('DT'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/DT').
If I have posted the same issue elsewhere, I have also mentioned it in this issue.
I have learned the Github Markdown syntax, and formatted my issue correctly.
I understand that my issue may be closed if I don't fulfill my promises.
First: DT is a great and mature package I love and use lot - thank´s for that 🎉
One major drawback I´ve noticed when applying custom renderings on cell content. DT has some predefined
format*()functions which are useful for specific cases. If I want a different cell output (icons, badges, tooltips, ...) things get quiet uncomfortable.Either I can use R and format the input data upfront using all the great tools like
htmltools,fontawesome, ... (This feels unclean to me, asDTshould be responsible for the cell formatting/ styling and not the "raw input data") or I have to go to the JavaScript side of things, which is ok but takes me outside of R.Recently I took a look at reactable and fell in love with their concept of custom cell rendering. Here´s a short example:
At the moment
DThas a very similar featureoptions$columnDefs$renderthat only supportsJS-Functions. I think it would be great to expand this to regular R-Functions. It would add endless flexibility to custom cell-rendering with an clean and easy to use interface.By filing an issue to this repo, I promise that
xfun::session_info('DT'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/DT').I understand that my issue may be closed if I don't fulfill my promises.