Flexdashboard - delay processing of hidden tabs/pages

386 views
Skip to first unread message

Andrew Clancy

unread,
Jun 16, 2016, 9:30:52 AM6/16/16
to Shiny - Web Framework for R
Hi - is there any mechanism in flexdashboard to prevent loading/running of a hidden page/tab until it is visible. I typically use a tabset as an input in shiny to achieve this, but this isnt immediately obvious in flex. 



Joe Cheng

unread,
Jun 16, 2016, 10:50:54 AM6/16/16
to Andrew Clancy, Shiny - Web Framework for R
It should automatically do that (if runtime:shiny). If that's not the behavior you're observing, can you send a repro case please? Thanks.
On Thu, Jun 16, 2016 at 6:30 AM Andrew Clancy <ni...@achren.org> wrote:
Hi - is there any mechanism in flexdashboard to prevent loading/running of a hidden page/tab until it is visible. I typically use a tabset as an input in shiny to achieve this, but this isnt immediately obvious in flex. 



--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/b7760347-26ea-4448-8964-c7c1014e798e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Clancy

unread,
Jun 16, 2016, 3:11:19 PM6/16/16
to Shiny - Web Framework for R, ni...@achren.org
Hi Joe, 

Simply adding a sidebar kills it - run this & you'll see 'running Screen 2' prints on load. I also need the sidebar to cover both screens - ie. similar to the nav in shinydashboards

---
title: "Test FlexDashboard"
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    horizontal_layout: fill
runtime: shiny
---

Screen 1
===================================================================================

Inputs {.sidebar}
------------------------------------------------------------------------------

```{r}
selectInput('a', label = 'A', choices = c('a','b'))

```

Column
---------------------------------------------------------------------------

```{r}
renderText({
  print('running Screen 1')
  'Screen 1'
})
```

Screen 2
=====================================================================================

```{r}
renderText({
  print('running Screen 2')
  'Screen 2'
})
```

Joe Cheng

unread,
Jun 16, 2016, 6:42:17 PM6/16/16
to Andrew Clancy, Shiny - Web Framework for R
For me, the sidebar isn't necessary, but a Shiny input control is--even a simple numericInput will trigger it. And the input can be on either page 1 or 2 and still triggers it.

I spent about half an hour looking for clues and haven't narrowed it down further than that. Do you mind filing a bug on https://github.com/rstudio/flexdashboard, please?

Joe Cheng

unread,
Jun 16, 2016, 6:42:31 PM6/16/16
to Andrew Clancy, Shiny - Web Framework for R
And thanks for the report!

Andrew Clancy

unread,
Jun 17, 2016, 5:35:24 AM6/17/16
to Joe Cheng, Shiny - Web Framework for R
Reply all
Reply to author
Forward
0 new messages