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
0
votes
1 answer

Applying conditionalPanel logic where one switchInput is set to TRUE, and a slider has different inputs

I'm implementing a R Shiny app, and my Javascript skills are not strong. I'm struggling to come up with the conditional logic in the conditionalPanel(). How do I have id3 only shown if id1 is set to TRUE, AND the slider range id2 has different…
Phil
  • 7,287
  • 3
  • 36
  • 66
0
votes
1 answer

Re-run Reactive from Shinyalert Callback

Is there a way to re-run a reactive via the callbackR argument in the shinyalert function? I'm making a CRUD shiny app which includes a reactive that fetches data from a database. The data in this reactive is then used in a renderDT function to…
hvgupta
  • 189
  • 12
0
votes
1 answer

How to make sliderInput 'lazy' and refresh only whenever required

How can we make sliderInputs in Shiny 'lazy' to refresh? CONTEXT In the following basic reproducible Shiny app, third sliderinput depends on second sliderinput, in the sense that (for example) : there is no 'Semester 2' possible value for…
cho7tom
  • 1,030
  • 2
  • 13
  • 30
0
votes
1 answer

Shiny button within nested module not showing up; namespace issue?

I'm trying to scaffold together a basic dashboard using the shinymaterial package (https://ericrayanderson.github.io/shinymaterial/) but having a slight issue where my dropdown menus (usually selectInput in regular shiny apps) don't show up in a…
Ray
  • 3,137
  • 8
  • 32
  • 59
0
votes
0 answers

Where are the CSS and Javascript files located, which Shiny generates during rendering?

Since Shiny Apps is a Web App service, it must generate HTML, CSS and Javascript files during output, correct? I have written my entire Shiny Code in ui.R, server.R, global.R and with some of the modules. Now I want to integrate this app in my…
0
votes
1 answer

Shiny modules and renderUI passing javascript code

I have been trying to get my renderUI code to respond to slick.js implementation shared by @Stéphane Laurent. Basically I have modules that create tables. I want the user to select the number of tables to be displayed. But I want those tables to be…
shamary
  • 305
  • 3
  • 12
0
votes
1 answer

using JS event function twice in shiny R to create a dropdown

I'm building a shiny app and one of the things I want to accomplish is to create a dropdown menu. I want to plot the labour variable as a function of the year variable for the different levels. See below for a sample dataframe: year level_2…
Liri
  • 350
  • 3
  • 19
0
votes
0 answers

Need simple UI Code in R

I have never created any UI in R, so need your help to create simple UI in R which has two browse buttons and Run button. I have written the code to extract the fields from PDF files and gives the standardized the output in an excel…
0
votes
0 answers

Right Side Bar handling in R Shiny

I am using library(ygdashboard) from here for build a Right Side control bar in Shiny Apps. Which most like AdminLTE.io template. In AdminLTE.io Right Side Control Bar there is an option,by enabling it the content part will adjust the width and…
Subhasish1315
  • 938
  • 1
  • 10
  • 25
0
votes
2 answers

enable tab with multiple input and disable tab with one input

i am working on an application where a user selects a single input the tab gets disabled and if user selects more than one input it gets enabled. can anyone help me with this . i have posted the reproducible example . library(shiny) …
SNEHA
  • 77
  • 1
  • 11
0
votes
0 answers

R shiny save a file path for next session

I've been making an app in shiny, and it is meant to use/edit the same file for multiple different people. The idea is that when you open the app for the first time, it'll prompt you to select the file, and save the location of the file so you…
0
votes
1 answer

To show fileinput and actionbutton inline

I am trying to build an app using R shiny where I am using fileinput and action button in same box. I am facing issues to show above two inline. Refer to below working example: library(shiny) library(shinydashboard) ui <- dashboardPage( …
kawsleo
  • 560
  • 4
  • 23
0
votes
1 answer

runjs to change location in observeEvent in flexdashboard?

I have a flexdashboard and there is an action button that does this: actionButton(inputId="submit", label = "Submit answers", class="btn btn-success", onClick="location.href='#section-your-results';") then an observer…
0
votes
1 answer

R Shiny aggregate data from renderUI checkboxGroupInput

I have four checkboxGroupInput() widgets, for simplicity A-D. Right now, all four are rendered in the UI, but B is hidden with shinyjs::hidden(). In the server, I unhide B dynamically in response to selections in A. My problem has to do with…
Blake
  • 45
  • 1
  • 6
0
votes
0 answers

Shiny renderUI elements not scaling to smaller screen

I have a couple items on a shiny dashboard (using flexdashboard, shinyjs, & shinyWidgets) that become obscured whenever I try to scale from a browser size to a tablet or phone screen size. This is only happening to items instantiated using the…
rws
  • 31
  • 6