650 questions
2
votes
1
answer
58
views
Detect active tab in a shiny module
I have a shiny module with some tabs. The goal is to detect which tab is active during a session and return the id of the tab in the console. I tried using some javascript but it doesn't seem to work. ...
2
votes
1
answer
37
views
How to hide/show a shinyWidgets dropdown with shinyjs?
Is there a way to hide shinyWidgets dropdown with shinyjs? Since dropdown has an id argument, i thought it could be hidden/shown like any other input. But somehow its not working. Below you find a ...
1
vote
1
answer
67
views
How to trigger events right before and after taking a Shiny screenshot?
I am trying to hide/show dedicated elements in my shiny app right before/after taking a screenshot with the shinyscreenshot package. I can't figure out the proper way to achieve this. I have tried ...
2
votes
2
answers
80
views
Advice to improve an implementation of shinyjs show/hide which uses modules and a 'click' event listener
I'm working on a UI element which contains a number of value boxes. When one of these value boxes is clicked, it shows hidden content. Additionally, when a value box is clicked, the other previously ...
3
votes
1
answer
123
views
Enabling/Disabling an R shiny input depending on the Internet connection
Is it possible with shinyjs to enable or disable a whole input depending on the state of the Internet connection of the user (i.e. on or off)?
I commented below what I think would be needed - ...
2
votes
1
answer
51
views
How to Disable a Button in a Shiny Nested Module?
I am trying to disable an action button inside a Shiny module when a specific radio button value is selected. Specifically, when "Log-normal" ("lnorm") is selected from the ...
1
vote
1
answer
146
views
How to display shiny error stack trace in popups instead of crashing app
I want to prevent my app from crashing in the case of an unforseen error. This happens when errors happen inside observers, so I created custom observer functions that handle errors by displaying the ...
1
vote
2
answers
96
views
How do I hide the spinner of shinycssloaders::withSpinner after I have used shinyjs::hide on the element?
I have a website with a non-constant amount of plots that I show/hide using shinyjs. I also want to have a spinner on the (visible) plots.
Here is what I have created:
library(shiny)
library(ggplot2)
...
1
vote
1
answer
46
views
Reset Multiinput - choices don't clear
I have a Shiny app with a selectinput where users select a dataset. The variables of the dataset then appear in a shinywidgets multiInput as choices. I also have a reset button that is supposed to ...
0
votes
1
answer
55
views
How to Exclude radioGroupButtons in shinyscreenshot
I'm building a Shiny app using shinyscreenshot.
My app includes a "Score" card with a list of radioGroupButtons that users can select from.
The radioGroupButtons are not visible in the app, ...
1
vote
1
answer
175
views
Can't get shinyjs to work in bslib dashboard
I'm sure that my placement of useShinyJS() is incorrect, but I have tried multiple locations and I just can't get it to work. In the code below, when hitting "Run" it should hide() two ...
0
votes
1
answer
75
views
How to namespace when using shinyjs?
I am creating namespace modules but am having problems now when using shinyjs() functions like hidden() and show(). In the below Example 1: with module, clicking the action button testButton should ...
0
votes
0
answers
72
views
Shiny reactive text causing fatal error when run on server
So I had an R Shiny dashboard that was running totally fine with no errors or warnings when run locally using RStudio. However, when deployed to a shiny server it was not working at all. The UI would ...
0
votes
0
answers
47
views
Creating an admin page using observe() instead of observeEvent()
So currently I am trying to make an admin page for my shiny app. Previously I had a button labeled "Admin" and when clicked would take you to a login page by hiding all previous pages and ...
3
votes
2
answers
174
views
How to turn off scrolling for a numericInput?
Does anyone know how to turn off the slider feature of a numericInput in R Shiny?. When I run my app and am entering an input into the numeric input field, if the field is still selected and the user ...
1
vote
0
answers
53
views
How do I get the value for a color picker in R Shiny?
In my Shiny app I am trying to get the value from a color picker. Using shinyjs::onevent I can get and put the value in the input control but when I am pressing the save button (which triggers the ...
0
votes
1
answer
114
views
How can I create a table with download buttons in shiny?
I have a shiny app and in this app a table that gives an overview over some items. I want to make it possible to the user to download these items by clicking on a button.
My current approach works ...
0
votes
0
answers
172
views
useShinyJS can't be found
when i run the the shiny app on ESS, there is no problem with useShinyJs(). However, when I run the shiny app on RStudio, it says useShinyJS() can't be found with the following error message:
Warning: ...
2
votes
1
answer
175
views
Shiny DT datatable with scrollY headers mis-aligned when width increased
In my Shiny app, I toggle the width of a DT datatable when a side panel is shown or hidden (using shinyjs addClass() and removeClass()).
The table does use scrollY, which I have read can cause issues ...
0
votes
1
answer
109
views
Why is shinyjs::enable not working for my fileInput?
In my shiny app, I have the fileInput disabled after the data was loaded. I also have a conditional reset button, that lets the user start over from scratch. However, while shinyjs::disable() is ...
0
votes
0
answers
42
views
Storing data to dropbox with rdrop2 makes youtube-api act up?
In reference to a persistent issue after this question Hide/Show in shinyjs not working when videos are randomized was answered.
Basically, I need to randomize whether one of three videos plays in a ...
0
votes
1
answer
78
views
Why are shinyjs' functions not working when videos are randomly selected?
I want to make a Shiny app that randomly selects one of two videos and, only after the video has been played, produces a radio button asking if people have watched the video.
This code works fine with ...
1
vote
1
answer
77
views
Shiny.setInputValue to open a new tab and set a value in dynamic selectInput only works after the tab has been loaded already
I am using shinyJS on a bslib page made with shiny in R to make links that are dynamically created within a DT. The link should open a different tab on the page as well as choose the value for a ...
0
votes
1
answer
168
views
How to print only first page calling shinyjs code
Here RShiny print current page it is shown how to print the current page with js code:
I would like to control the number of the page to be print. I want to print only the first page. Usually I do ...
0
votes
1
answer
32
views
How to replace isolate() with another reactivity management function that serves the same purpose in R Shiny?
The below example code has 3 linked user input matrixes: the first, base_input, allows the user to make static inputs and the next 2 user input matrixes, var_1_input and var_2_input (collectively, &...
0
votes
2
answers
95
views
R Shiny: enabling/disabling shinyWidget using shinyjs
I have a dropdown with two date presets and one "Custom" preset.
The "custom" preset should enable the user to use the date picker input to select a custom date range. If any other ...
0
votes
1
answer
35
views
R shinyjs::disable not working when using choiceNames/choiceValues in updateCheckboxGroupInput
I want a choice of a checkbox group to be disabled dependent on a selected radio button. This works perfectly with shinyjs. However, if I also conditionally change the font color of that choice, it ...
1
vote
1
answer
131
views
SelectizeInput becomes opaque when disabled
I am developing a shiny app in which I use the bslib package for theming. However, when I disable the input as shown below it becomes unreadable:
library(shiny)
library(bslib)
ui <- page_fluid(
...
0
votes
1
answer
103
views
How to show and hide a user input triggered by a reactive from another module?
I've been showing/hiding UI items using Shiny conditionalPanel() and shinyjs show, hide, and toggle functions. However, in this multi-module example I'm stuck. I'm trying to show/hide the selectInput()...
1
vote
1
answer
51
views
Variable being passed to Shiny input not triggering observeEvent
Trying to understand why this code is not working, keep in mind I am not even a JavaScript novice. The observeEvent does not even get triggered.
library(shiny)
library(shinyjs)
library(jsonlite)
ui &...
1
vote
1
answer
83
views
JavaScript to update active sidebar menuSubItems linked to TabPanel in dashboard
I am trying to build a Shiny dashboard with menuSubItems that should correspond to TabPanels. I need also a button on the Home page that move to these TabPanels. This part is not working too bad. The ...
1
vote
2
answers
48
views
shinyjs is not excecuting all actions inside observeEvent
I got an app that when you click on an actionButton, it should set an input to a certain value; and a click action should be made through shinyjs. However, only the first thing is happening; and I don'...
0
votes
1
answer
185
views
How do I use Shinyjs onclick and toggle functionality in a Shiny module?
I'm trying to create a shiny module to toggle (show/hide) a wellPanel with some inputs. When I add the shinyjs::onclick() piece of code in the server side of the module, the toggle does not work. ...
1
vote
1
answer
83
views
How to draw and erase and change the brush size and color?
Colors should appear and change when dragging the slider button but nothing happens, there is just a blank canvas in the right hand side of the screen. I changed some things before it was not even a ...
0
votes
0
answers
176
views
How to turn off the double-click/zoom behaviour of a leaflet map?
I am building a shiny app that contains a leaflet map object and the following functionality.
Basically, I want to single-click on the map, grab the coordinates of the clicked spot, use sf to filter ...
1
vote
1
answer
60
views
How to use reactiveValues instead of reactiveVal as a module parameter?
Working minmal example
I am trying to disable a module UI with the package shinyjs. From the main app I use a reactive paramater called enabled:
library(shiny)
library(shinyjs)
# ...
1
vote
1
answer
86
views
How to make the inner module use the namespace of outer module
First, I define a vsmoduleUI and vsmoduleServer, and put the different UI and Server in them, base on the type.
ui
vsmoduleUI
barUI
violinUI
boxUI
others
server
vsmoduleServer
barServer
...
1
vote
0
answers
196
views
In Shiny/R how to drag and drop and save state
I need to send a the link of my app to a client.
I will ask him to change de positions of the images (the images are inside the html divs).
After he/she decide the order of positions he will save the ...
0
votes
0
answers
226
views
Loading an R shiny app but running into issues loading libraries
My shiny app utilizes the randomForestSRC library. It operates fine on my own PC and in my version of R, but I am trying to upload it to an online server space where I need to manually install my apps....
0
votes
1
answer
104
views
R Shiny - initiate loading screen from global.R?
I have a Shiny app that uses a global.R file to load some large datasets, something that takes around 15-20 seconds.
When the app is loading, only a blank white screen is shown.
I'd like to be able to ...
0
votes
1
answer
291
views
Using shinyjs, insertUI() and removeUI() with Shiny modules
EDIT: I just needed to change the namespace of the insertUI selector!! Will leave up for others.
insertUI(
selector = paste0("#",ns(add)),
where = "afterEnd",
...
1
vote
1
answer
949
views
How to show/hide cards in with shinyjs and bslib with a D.R.Y. approach
Consider the following mockup shiny app. It does what I need (effectively toggling the show/hide of each card based on the checkbox, input$checkbox), but it's not very D.R.Y. and would be hard to ...
1
vote
1
answer
127
views
How to make an orderInput item resizeable with jqui_resizable
Update: Here is graphical explanation from what I want:
There are to features: 1. resizing with the mouse and 2. rotating the text.
This is a follow-up question to this Drag and drop with shinyjqui ...
0
votes
1
answer
374
views
How to use Shinycssloaders from beginning of fileInput loading?
I'm deploying an app with Shiny and I need to load a file, for that I'm using the fileInput function although I don't necessarily have to use this function, and I want to use a function from the ...
1
vote
1
answer
181
views
Implement drag-and-drop functionality using an observeEvent triggered by an actionButton in shinyjqui
This is a follow-up question to this Drag and drop with shinyjqui to a grid-table
This is the code:
library(shiny)
library(shinyjqui)
connections <- paste0("droppable_cell_", 1:7) # id ...
0
votes
0
answers
98
views
Sidebar always minified
I know that shinydashboardPlus allows me to minified the sidebar like the example:
siderbar <- dashboardSidebar(width = 50,
collapsed = TRUE,
sidebarMenu(
id = 'sidebar', # Tab1
...
1
vote
1
answer
308
views
How to control the main panel width in Shiny App during collapse and expand?
I have a shiny app with side bar and main panel where on clicking the toggle button, sidebar collapses and main panel expands (width also increases). But when I try to click the toggle button again ...
0
votes
1
answer
206
views
How do I use shinjs::extendShinyjs() in a shiny module?
shinyjs::extendShinyjs() does not seem to work in a Shiny module without at least some namespacing.
Here is an example of using a simple JS extension to increase an input value (which works as ...
0
votes
0
answers
92
views
Hide or show inputs according to a pickerinput choice in Shiny
I have a shiny application where I create a certain number of inputs based on a numeric input.
These inputs are :
Some text to display which input number you are at
A pickerinput with the selected ...
0
votes
1
answer
89
views
How do I make shinyjs::show work with animation? Is this behaviour here a bug?
I want to show a datatable depending on wether a checkbox is checked or not. It is working fine if I do not animate, however with animations active it does not work. Is this a bug or am I missing ...