Skip to content
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

Parent container created by shiny::tabPanel() not taking full vertical container space #4050

Open
rempsyc opened this issue May 9, 2024 · 0 comments

Comments

@rempsyc
Copy link

rempsyc commented May 9, 2024

Follow-up on plotly/plotly.R#2350


It seems that the parent container created by shiny::tabPanel() is not taking up the full vertical screen space. This creates problems for dynamic sizing with plotly plots or DT tables.

Here is a reprex. The example below works as expected, and ggplotly takes the full vertical space:

---
output: flexdashboard::flex_dashboard
---

```{r}
x <- ggplot2::qplot(mtcars$mpg, mtcars$disp)
p <- plotly::ggplotly(tooltip = c("x", "y"))
p
```

image

However, ggplotly does not take the full vertical space when inside shiny::tabPanel():

---
output: flexdashboard::flex_dashboard
---

```{r}
x <- ggplot2::qplot(mtcars$mpg, mtcars$disp)
p <- plotly::ggplotly(tooltip = c("x", "y"))
shiny::tabsetPanel(shiny::tabPanel("Tab 1", p))
```

image

Same with DT tables:

---
output: flexdashboard::flex_dashboard
---

```{r}
shiny::tabsetPanel(shiny::tabPanel("Tab 1", DT::datatable(mtcars)))
```

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant