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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
26 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 ...
Dave916's user avatar
0 votes
1 answer
25 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", ...
runningoutoftime's user avatar
1 vote
1 answer
44 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 ...
JasonAizkalns's user avatar
1 vote
1 answer
52 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 ...
TarJae's user avatar
  • 72.7k
0 votes
1 answer
56 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 ...
CarlosFVásquez's user avatar
1 vote
1 answer
104 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 ...
TarJae's user avatar
  • 72.7k
0 votes
0 answers
18 views

customization of Esquisse icons

I'm writing a small app using esquisse and I wanted to customise the icon used. I've thought about different way. The first one of course is tochange directly the icon in the package but I wanted to ...
Jojostack's user avatar
  • 181
0 votes
0 answers
28 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 ...
Thiago Godoy's user avatar
0 votes
0 answers
13 views

In R, the total of a column to be displayed on the dashboard that match the search bar. If nothing is in the search bar, then display the full total

I'm trying to make a basic shiny dashboard for my small company which can keep track of the parts in inventory. The code will make a db and have the function to be able to add and edit entries and I ...
Matthew Rogers's user avatar
1 vote
1 answer
36 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 ...
Golem's user avatar
  • 82
0 votes
1 answer
24 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 ...
colej1390's user avatar
  • 312
0 votes
0 answers
53 views

R Shiny Leaflet map doesn't center properly after expanding the container

I have a Shiny app that correctly collapses the datatable beneath a leaflet map, extends the map and then also brings back the datatable with a button click. The problem is something happens to the ...
rtb's user avatar
  • 1
0 votes
0 answers
64 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 ...
Nathan Bertaut's user avatar
0 votes
1 answer
23 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 ...
Noskario's user avatar
  • 378
0 votes
0 answers
19 views

Why is downloadHandler not being set using loop and action button surrogate?

I want a number of action buttons created using renderUI to trigger downloads. The action button-to-download button transfer is working, but the downloadHandler is not, as button clicks prompt to ...
matt's user avatar
  • 320
0 votes
1 answer
26 views

Toggling a conditionalPanel within rintrojs

I would like an introduction using rintrojs that highlights a button that toggles between showing and not showing a conditionalpanel. If the conditional panel is not showing, when the intro gets to ...
Nate Hawkins's user avatar
0 votes
1 answer
44 views

Shiny: initialize a tabPanel() as disabled

I have an app where a certain tabPanel() must be initialised as disabled. Solutions seen elsewhere (e.g. Shiny: Disable tabPanel() using shinyjs) address the problem by disabling the tabPanel() after ...
dkarlez's user avatar
0 votes
0 answers
27 views

Unable to run a Shiny app locally that works on the Shiny server

My app on the Shiny server here: https://jphill01.shinyapps.io/HACSim/?_ga=2.90439571.82396853.1682966189-1506360040.1682966189 works fine. However, the app does not seem to run locally on my system (...
compbiostats's user avatar
1 vote
1 answer
72 views

Modularized Shiny app: How to download dataset passed between modules

Background I want to pass a dataset (iris in the below reprex) between modules. Once passed, I want to click a button to download the dataset. I'm not able to download the dataset. It's part of a ...
s-mabdurrazak's user avatar
1 vote
1 answer
36 views

How do I reset input$variable in the Shiny Server code block?

In the Shiny App below, I have added a few buttons to my DT and with every click I would like to +/- 1 to the number column in the DT. This works, but when a button is clicked twice the second time it ...
Jochem's user avatar
  • 3,305
2 votes
1 answer
229 views

Shiny app: how to go one step/entry back (with a back button) after multiple data entry/series of radio radiobutton entry

I have written a shiny app that presents different radio buttons to the user. Depending on the input, numbers will be added to a score/counter and other radio buttons will pop up (and the previous ...
ava's user avatar
  • 874
0 votes
2 answers
39 views

How to clear fileInput data and corresponding objects in R Shiny?

After looking at some exisiting solutions I still could not solve the problem. I want to delete every data that was uploaded in my shiny app after pressing the sign_out button (which of course also ...
Almax's user avatar
  • 11
2 votes
1 answer
38 views

How to disable an actionbutton until embedded video is complete in Shiny

I'm building an app which includes embedded video and audio files. I've got action buttons that let users navigate forwards, but I need them to be greyed out until the embedded video/audio is complete....
Casper's user avatar
  • 33
0 votes
0 answers
19 views

shinyjs reset() with shiny.fluent inputs?

I have some trouble implementing a reset button for a few inputs in a shiny.fluent app. I wonder if shinyjs function reset() work with shiny.fluent inputs at all? I have tried other shinyjs functions ...
Helbisch's user avatar
3 votes
1 answer
66 views

Observe fileInput button click even when no file loaded in R shiny app

I have a short and seemingly naive question : How can I detect that fileInput button has been clicked, even if no file is selected ? Indeed, I would like to do something in observeEvent when a ...
Erica Fary's user avatar
0 votes
1 answer
127 views

r shiny - communication of inputId between shiny modules in order to use shinyjs functions like disable/enable/toggle

I've been delving into Shiny modules, and so far, everything has been going well. However, I'm having trouble manipulating inputIds that come from another module. Specifically, I want to use functions ...
iferdel's user avatar
  • 25
1 vote
1 answer
58 views

Disable inputs while server is busy

What is the best way to disable all inputs while the server is busy computing? I have several inputs whose changes trigger small computations and the rendering of an output. Usually everything works ...
moremo's user avatar
  • 325
0 votes
0 answers
58 views

Reactive values not updating when actionButton is clicked with shinyjs

I have a Shiny app in which a pickerInput() is updated based on the value selected in another pickerInput(). library("shiny") library("shinyWidgets") ui <- fluidPage( shinyjs:...
Wil's user avatar
  • 3,088
0 votes
0 answers
75 views

Shiny error caused by slow updates to the client side from the server side?

The Problem Run the shiny app Set type to "colors" and set data entry method to "acronyms" Select data to enter, click "add objects" Change the type to "shapes"...
ifoxfoot's user avatar
  • 205
0 votes
0 answers
30 views

The reactiveValues() refresh the whole dataTable in shiny

I want to build a table inclue some buttons. When we click the buttons, the value of certain row will show. Importantly, every button can only be click once. However, when I use reactiveValues() it ...
Dou's user avatar
  • 71
0 votes
0 answers
14 views

ShinyJS toggle applied to several modules

I have a solution with one module which after selecting a radio button (2), div (second module) is expanded. I would like to add another module (another radio button and code chunk (div third module) )...
awoj's user avatar
  • 133
1 vote
0 answers
208 views

QR code scanning using Mobile Camera in Shiny Web App

I am trying to develop a shiny webapp where users can scan the QR codes from their mobile phones. I have written the below code for scanning the QR codes using javascript and shiny. The code is ...
Hrx's user avatar
  • 11
1 vote
1 answer
183 views

Hot to use shinyjs to get the id of a clickable <div> element?

I'm making a ShinyApp that uses plain HTML to order clickable <div> sub-elements inside another <div> element. I want the click event on the sub-elements to trigger a reactiveVal() in my ...
Cris's user avatar
  • 325
0 votes
0 answers
137 views

How to return the filtered rows in a reactable table in a Shiny app module

I am looking for some help please to develop a solution to return the filtered rows in a reactable table in a Shiny app module. I am looking to identify which rows are the subset of mtcars after the ...
CallumH's user avatar
  • 751
0 votes
1 answer
25 views

redirect console log to verbatimTextOutput and autoscroll to the bottom with custom css

given a verbatimTextOutput("consoleOutput") in the ui of a shiny app, what is needed to redirect the console log output to the verbatimTextOutput, autoscroll to the bottom when a new message ...
Dev Nocz's user avatar
0 votes
1 answer
67 views

update menuanchor of fullPage.js in R Shiny App from server side

I am using the fullPage package to create a Shiny App and I am facing the following issue : I would like to update from the server side the labels of the menu that are first defined in the pagePiling ...
mazu's user avatar
  • 173
1 vote
0 answers
66 views

R Shiny App access variables from embedded Jotform HTML code with javascript

I have created a form with Jotform that I would like to embed in my R Shiny App. Using shinyjs (?), I would like to access the information filled in the form by the user for using it somewhere else in ...
mazu's user avatar
  • 173
1 vote
1 answer
44 views

Why does shinyjs::reset clobber subsequent updateTextInput commands?

The new name value is not getting set after the reset when "Fill example name" is hit library(shiny) shinyApp( ui = fluidPage( shinyjs::useShinyjs(), shinyjs::inlineCSS(list(.big = ...
Jeremy Leipzig's user avatar
2 votes
1 answer
64 views

generate right click and select custom menu R shiny JS automatically

I have created the following App using R Shiny library(shiny) library(rhandsontable) library(shinyjs) ui <- fluidPage( sidebarLayout(sidebarPanel = "Inputparameter", ...
Raghavan vmvs's user avatar
1 vote
1 answer
65 views

I need JS code to collapse a box in Shiny/bs4Dash

I try to collapse a box with an action. This code works in shinydashboard how should I change jscode for doing same thing in bs4Dash ? Any idea? library(shiny) library(shinydashboard) library(shinyjs) ...
Ugur Dar's user avatar
1 vote
1 answer
37 views

Shiny actionbutton to set a customized default

In this shiny App (code below), I need that the button labeled 'Customized' returns: Select var X: disp Select var Y: drat Point size: 1.0 This necessity is a bit similar to the reset button ...
Hassan Camil David's user avatar
0 votes
1 answer
109 views

Change html with an animation effect in a shiny app

I am having a shiny app with some ui elements. Is there a way to replace some HTML (e.g. div / div content) with an animation effect, similar to what shinyjs::show(anim=T) does? library(shiny) library(...
wati's user avatar
  • 310
1 vote
1 answer
27 views

Deactivate shiny selectInput() choices from being selected

In the shiny app below I have a selectInput() in which I want only the choices to be displayed but it will not be possible to select another one of the choices than the selected one. In a few words I ...
firmo23's user avatar
  • 7,560
0 votes
1 answer
70 views

R flexdashboard Error in disabling the submit button even if there is no radio button option is selected or when any option is selected

In my flexdashboard code, what I am trying to do is: initially, no radio button is selected, and there are two options only option (radio button) one is to upload the data, option two is to connect ...
LeMarque's user avatar
  • 743
0 votes
1 answer
175 views

Aligning verbatim text output to text input in fluidrow - R Shiny

I am trying to display some input field alongside some output field inputted from another tab. However the output field is going below and cannot align with the rest. Code given below:- fluidRow( ...
Anindya Sankar Dey's user avatar
3 votes
0 answers
56 views

Shinyjs hide and show not properly working

I have a problem with shinyjs hide() and show(). I use this to hide and show different data anyalysis that can be choosen from a side bar. If I do one part of my code it works fine but when I hide() ...
Marina Ar's user avatar
2 votes
0 answers
108 views

sequence of events in shiny r when simulating button clicks by javascript in a loop

I am simulating several clicks on an action button by doing javascript calls document.getElementById('btn').click(); in a loop. The issue is that the loop runs first to the end (say 3 times as in ...
Pavel Khokhlov's user avatar
2 votes
1 answer
296 views

In Shiny click event is not working when using modules

why when Im using modules the clickable feature in my highchart treemap is not working. I tried this without module and worked well. Probably is something related no namespace, right , but I can not ...
JohnBones JohnBones's user avatar
0 votes
1 answer
18 views

Shiny : keep the value in the mainpanel

This app shows a radiobutton choice between 3 lists : lower, upper, digit items To test it, save the following code below in a directory "shiny" and in an app.R file. Then launch R and type :...
Fabrice's user avatar
  • 365
1 vote
1 answer
218 views

How can I toggle the Action Button on/off using ShinyJS?

I have built a simple Shiny App with a plotly drilldown chart. I want the Action Button to appear only when the plotly click event occurs (this is working), but then I want the Action Button to ...
Harry Kalsted's user avatar

1
2 3 4 5
13