-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opt_interactive
with fmt_markdown
renders an empty pane
#1835
Comments
I can't reproduce the issue on Windows R 4.3.2. Can you reproduce it with plain reactable output? |
Thanks for the investigation! I don't know what happens for gt(iris) |>
fmt_markdown(c("Sepal.Length")) |>
opt_interactive(height = px(600)) Should work in the meantime. When there are some bugs like this, I typically adding things like this in my Rprofile # workaround rstudio/gt#1835
opt_interactive2 <- function(data, ...) {
gt::opt_interactive(data, ..., height = gt::px(680))
} So that when I call the function in the console, I can do it like so: gt(iris) |>
fmt_markdown(c("Sepal.Length")) |>
opt_interactive2() |
I just noticed this code added in #1629 @obsaditelnost can you explain what this does and why you added this? Thanks gt/inst/css/gt_styles_default.scss Lines 439 to 441 in a52eb41
|
The reactable.css sets ".rt-th-group:after" to a 1px solid grey 'area' acting as a border. Together with gt's explicit "border-bottom" style definition of ".rt-th-group" it looks off, especially if you define another border colour: If we revert the synthetic colgroup-border from reactable.css (by just setting it is 0px) we have more freedom to apply the previously defined gt-styles (even though many of them are not yet supported for interactive tables) |
@francoisluc did you try to run your reprex in a plain R-Terminal without using RStudio? If this works, the versions of RStudio and R might be incompatible somehow, just like here: rstudio/rstudio#14603 |
Hi, I finally found the issue. I was able to render in VS Code but not when I render a quarto document. I render the same document on my windows machine (not up to date) where the fmt_markdown works and compare it to the same document rendered in ubuntu. I found out that the document on ubuntu uses <script src="test2_files/libs/reactwidget-2.0.0/react-tools.umd.cjs"></script> but the document in windows uses <script src="test_files/libs/reactwidget-1.0.0/react-tools.js"></script>. I made a quick search and found out this was changed in reactR 0.6.0. When I downgraded to 0.5.0, the html renders correctly. Is there any changes you need to perform in |
Thanks for the investigation! It may be a reactR / reactable issue : glin/reactable#388 react-R/reactR#86 |
Thank you, I will follow those issues. |
reactR 0.6.1 released. This should be fixed! |
Prework
Description
When I only opt_interactive, the gt table shows in rstudio viewer pane (and quarto html). If I add the function fmt_markdown, the viewer pane is blank and the output in the quarto document is also empty.
My VM runs rstudio Pro and all packages are up to date.
Reproducible example
Expected result
Session info
Rstudio version
Thanks for checking that issue.
The text was updated successfully, but these errors were encountered: