Coder Social home page Coder Social logo

Comments (4)

maju116 avatar maju116 commented on May 24, 2024 1

@biranjan There's no more need to add suspendWhenHidden = FALSE in outputOptions. This issue was solved in 86b274d

from shiny.semantic.

krystian8207 avatar krystian8207 commented on May 24, 2024

Hi. We added 37bfd80 fix to this issue. To proper functioning, you should also add suspendWhenHidden = FALSE outputOption for each output, as in the following example:

library(shiny)
library(shiny.semantic)
library(highlighter)
library(magrittr)
library(plotly)

ui <- shinyUI(semanticPage(
  suppressDependencies("bootstrap"),
  tabset(tabs=
           list(
             list(menu="First Tab", content= "Text works well"),
             list(menu="Second Tab",content=plotOutput("plot1")),
             list(menu="Second Tab",content=plotlyOutput("plot2"))
           )
  )
  # Below comment fixes issue manually, without last commit:
  # ,tags$script(paste0("$('.menu .item').tab({onVisible: function() {$(window).resize()} });"))
))
server <- shinyServer(function(input, output) {
  output$plot1 <- renderPlot(plot(1,1))
  outputOptions(output, "plot1", suspendWhenHidden = FALSE)

  output$plot2 <- renderPlotly(plot_ly(mtcars, x=~mpg, y=~cyl, width = "100%"))
  outputOptions(output, "plot2", suspendWhenHidden = FALSE)
})

shiny::shinyApp(ui, server)

If you want to use cran version of shiny.semantic just uncomment the last parameter of ui above in orderto fix the issue manually, otherwise install the package from github.

from shiny.semantic.

biranjan avatar biranjan commented on May 24, 2024

First, thanks for such a great package it really adds shine to shiny. For some reason when I reinstalled the package via github it didn't really work, however, the solution presented above did work. There seem to be missing: , before the tags$script though in case if anyone copy pastes it without adding missing ,.

from shiny.semantic.

filipstachura avatar filipstachura commented on May 24, 2024

@biranjan Thanks, for the feedback. (I've added the , in the example)

Closing the issue.

from shiny.semantic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.