Questions tagged [shinyjs]

shinyjs is an R package that lets you perform common useful JavaScript operations in Shiny applications without having to know any JavaScript. This is turn allows you to easily improve the user interaction and user experience in your Shiny apps. It can also be used to easily run your own custom JavaScript functions from R.

shinyjs lets you perform common useful JavaScript operations in Shiny apps that will greatly improve your apps without having to know any JavaScript.

Examples include: hiding an element, disabling an input, resetting an input back to its original value, delaying code execution by a few seconds, and many more useful functions for both the end user and the developer. shinyjs can also be used to easily call your own custom JavaScript functions from R.

Useful resources:

637 questions
5
votes
2 answers

How to hide/show several elements at once with shinyjs?

How to hide/show several elements at once with shinyjs? In the following example my goal is to hide/show both tables with just two lines of code instead of four. Why do I want to do this? In reality, I am dealing with several tables and several…
Joe
  • 1,628
  • 3
  • 25
  • 39
5
votes
0 answers

datatable with nesting/child rows and modal

I am trying to make a datatable that has two layers of nesting. The first one is used for grouping rows (https://github.com/rstudio/shiny-examples/issues/9#issuecomment-295018270) and the second should open a modal (R shinyBS popup window). I can…
Jan Stanstrup
  • 1,152
  • 11
  • 28
5
votes
2 answers

How to capture shinyalert input field as variable

I'm trying to use the relatively new shinyAlert package to see if it offers better results than the sweetalert package but I'm unable to figure out how to get this: Myvar <- shinyalert input text from this minimal example.…
Mark
  • 2,789
  • 1
  • 26
  • 66
5
votes
1 answer

Shiny server Connection closed. Info: {"type":"close","code":4503,"reason":"The application unexpectedly exited","wasClean":true}

I've encountered a problem with deploying my shiny app on linux Ubuntu 16.04 LTS. After I run sudo systemctl start shiny-server, and open up my browser heading to http://192.168..*:3838/StockVis/, the web page greys out in a second. I found some…
Jessie
  • 51
  • 5
5
votes
1 answer

Shiny: Dynamic colour (fill) input for ggplot

i do need some help as the post: Dynamic color input in shiny server does not give full answer to my problem. I would like to have dynamic colour (fill) selection in my shiny app. I have prepared a sample…
Mal_a
  • 3,670
  • 1
  • 27
  • 60
5
votes
1 answer

tab specific sidebar in shinydashboard

I am using the shinyjs package in R to allow for onclick type events to navigate between tabs in a tabset. Each tab has a specific sidebar, and there are multiple (two) ways of getting between each tab (i.e. via clicking on the tab itself or by…
h.l.m
  • 13,015
  • 22
  • 82
  • 169
5
votes
1 answer

Page refresh Button in R shiny

I tried to implement a page refresh button following the link here. However when I tried deploying to shinyapp.io, it failed and asked for installing package V8 which I had already done. The app was working fine on the machine. The code I used…
Rajarshi Bhadra
  • 1,826
  • 6
  • 25
  • 41
5
votes
3 answers

Hide an element (box/tabs) in shiny dashboard

I have a shiny dashboard which has a just a single text box on the landing page. The user enters an emailid which displays relevant data. This works fine. However I need a box/ tab Panel that greets the user on reaching the page and disappears when…
mongofresher
  • 173
  • 1
  • 4
  • 10
4
votes
0 answers

Change initial Shinyapps "Please wait" message

How can we change the initial "Please wait" message when an app starts up on shinyapps? I am referring to the startup message of shinyapps.io, not packages like Waiter or shinybusy (for example) because the initial message "Please wait" still…
John john
  • 437
  • 3
  • 13
4
votes
1 answer

How do you use addResourcepath() in R Shiny?

I'm struggling to understand how to use the addResourcePath() function from R shiny (https://shiny.rstudio.com/reference/shiny/latest/resourcePaths.html), even despite this apparent solution to someone with a similar question How do I porperly use…
Jamie
  • 401
  • 3
  • 11
4
votes
1 answer

Drop-on functionality in table in Shiny

I am searching for a method (package) that enables me to 'drop' a row from one table on a row in another table. The server-side functionality that I am envisioning with it is that I can create some logic that will update the destination table.…
Jochem
  • 3,295
  • 4
  • 30
  • 55
4
votes
1 answer

Shiny: Disable tabPanel() using shinyjs

I'm using @SriPaladugu's answer provided here to disable a tabPanel() and I noticed that it doesn't work if there exist a space in tabPanel(title,...). They wrote their own JavaScript code and used shinyjs to enable/disable panels and I'm not…
theneil
  • 488
  • 1
  • 4
  • 14
4
votes
1 answer

Shiny app with UI entirely built in HTML - ShinyJS display/hide elements don't work

I have a shiny app with UI entirely written in HTML and I need the HTML element with specific id to be hidden/shown, depending on whether the data meets specific conditions. Below is a simplified version of what I already have, I used ShinyJS, but…
Ewelina Luczak
  • 379
  • 4
  • 13
4
votes
3 answers

activate/deactivate tab in the rightsidebar of a shinydashboardplus at click on left sidebar menu item

I'm building a Shiny app using the great ShinyDashoardPlus package (styled with a theme from the Dashboardthemes package) that has three tabItems holding the contents for the three sections of the app (section A, section B, and section C),…
4
votes
0 answers

How to retain scroll position after change of input in Shiny

In Shiny I use a horizontal radioGroupButtons input with huge number of items. If you click on one of the items, the color of the label of the button changes. This works actually fine. However, if I click on one of the last items so that I have…
WJH
  • 539
  • 5
  • 14