shinyalert | 🗯️ Easily create pretty popup messages (modals) in Shiny | Data Visualization library
kandi X-RAY | shinyalert Summary
kandi X-RAY | shinyalert Summary
{shinyalert} uses the sweetalert JavaScript library to create simple and elegant popups (modals) in Shiny.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of shinyalert
shinyalert Key Features
shinyalert Examples and Code Snippets
Community Discussions
Trending Discussions on shinyalert
QUESTION
So I'm trying to make a very simple Shiny R dashboard that shows the progress percentage which will be linked to an editable excel file. here's an example data:
...ANSWER
Answered 2022-Feb-18 at 13:34Indeed, it looks like you are trying to do relatively simple app (however it's OK to define complexity based on developer's experience I think).
I will show you how to make this simpler and how to make it works:
QUESTION
I have a shiny app for uploading CSV file. I used the function sendSweetAlert
from shinyWidgets
package to send custom message but I would like to reload the page when user clik on "Ok" button
I tried to use shinyalert
from shinyalert
package but i dont get the desired result.
This is what I did :
...ANSWER
Answered 2022-Feb-10 at 12:49You can use callbackJS
in shinyalert()
:
QUESTION
In the app below when the user does not upload a .xls
file I want a pop up to be displayed. Now it appears only in the beginning but if upload another lets say doc
file it is hidden. I do not care it is with shinyalert
package or other method.
ANSWER
Answered 2022-Feb-08 at 14:09This also resets the fileInput
:
QUESTION
I have created a modal that is activated when the app is launched and warns the user that he first needs to upload an excel file. But when I upload it the modal is displayed again which seems to be wrong.
...ANSWER
Answered 2022-Feb-08 at 01:50Perhaps you can try with an if condition.
QUESTION
My shinyapp is build using modules, the radioBox component inputId = modelling_type
is created in the server, using a renderUI function and stored under outputId = modelling_type_ui
As I'm using modules, I have name spaced my IDs in the mod_ui
, and then in order to (attempt!) to use the same name space function in the mod_server
I have called it via ns <- parentsession$ns
. This doesn't throw an error. But I would now expect to access the value of the RadioBox via input$modelling_type
This isn't working! So I must be calling the value incorrectly.
Here is the code:
...ANSWER
Answered 2022-Jan-21 at 16:09To expand on my comment above, here is a MWE that I believe does what you want.
I'm not sure why you're using uiOutput
and renderUI
. I assume it's needed in your actual use case, but it's not needed here. Also, there's no need to muck about with parentsession
and the like.
One reason why your debug print prints NULL
is that you haven't defined the radio group at the time you try to print its value.
QUESTION
I have created a survey in Shiny and I would like that the options in this survey are always different. To do so, I have used the sample
function and each time I run the app on my local machine the possible options for the answers are always different as I want.
However, I have recently deployed the app through shinyapps.io and it seems that the there is no more randomness in the possible options.
This is the code of my shiny app :
ANSWER
Answered 2021-Dec-04 at 16:46This can be fixed by moving the random calculation inside the server
function, otherwise, if you execute a random function outside the server
, it will work, but it will be the same for all the users. This behaviour is to prevent large calculations from happening unnecessary times if for example, all users will have access to the same data.
Below is the code for the app i deployed in shinyapps.io
. Because i need to execute create_options()
inside the server
, i will use renderUI()
. If I use sample()
inside any part of the UI it will only be executed once, hence the static options.
Also, i used prettyRadioButtons
from shinyWidgets
to prevent that users pick more than one option.
code:
QUESTION
I am writing an app that will be used to copy large numbers of photos (often tens of thousands at a time) from SD cards to external hard drives, which people will be running in the background while they do other work. I want to notify the user when the file copying is finished so they don't have to keep checking the app. I have used shinyalert()
in the past, and I am also aware of using javascript functions to send alerts as well (this is the one I found:
ANSWER
Answered 2021-Oct-27 at 22:46A better option is to use browser notification. This will trigger the browser to send out notifications in front of all windows and all other software programs. Plus, this works across all platforms, no matter what version of Windows or Linux or MacOS, as long as they have a modern browser, like Chrome, Firefox, Edge or others, it will work.
Here is how to do:
QUESTION
Very new to Shiny here, I have a module like the one below where I just want 2 SelectizeInput
menus with the same options each.
The trick is that they have to be mutually exclusive, so I understand I have to use updateSelectizeInput
to update the selected options in one menu based on the selected options in the other.
This should work in such a way that if I select one option in one menu, it has to be removed from the selected options in the other menu, and vice versa.
I understand the moving pieces here, but I am not sure where to place them and how to finally accomplish this.
This is what I have so far:
...ANSWER
Answered 2021-Oct-20 at 13:16This should do what you asked.
I removed the extra calls to shinyjs
and shinyalert
and added call to library(shiny)
to make it a MWE. I removed the argument r
to the server call.
I've also moved the input to the UI, removed the uiOutput
and renderUI
as it wasn't needed in this case (I'm not sure if the are needed for other parts of your code). Then taking setdiff
of the options gives you the new set to update the selectizeInput
with.
I've also added code at the bottom to run and test the app.
QUESTION
Over the last couple weeks I've been experimenting using shinyalert() to explore the potential of using inputs within an alert and trigger a chain shinyalert() if inputs are not left blank. There a couple of things that are high priority in my mind:
1: I need to cancel the chained modal if the cancel button is selected. I believe I have this part figured out.
2: If any inputs within the shinyalert are left blank, I also need to cancel the chained modal.
The below code seems to function on first use but it quickly becomes evident that it keeps variables in memory (not sure if this is correct terminology) for some reason that I cannot figure out:
...ANSWER
Answered 2021-Oct-18 at 22:03Thanks very much to Stéphane Laurent for commenting the existing bug thread, I never would've found that! Evidently my issues are just a bug with shinyalert() and can be fixed by delaying evaluation for ~380 ms. It seems Dave is pretty busy so I'm not sure if/when it will get fixed but if you are encountering similar issues in the future, I'd recommend checking https://github.com/daattali/shinyalert/issues/46 in case this workaround no longer becomes necessary.
One can do this with delay() in the shinyjs library. While a less than ideal long term solution, it solves my qualms perfectly. Not only does it allow me to use typical shiny nomenclature (using a uiOutput in the callback), but it also fixes the issue I had with Shiny keeping old values. Below is an example of the first set of code adjusted to work (very similar for the second):
QUESTION
I am trying to make a Shiny app using golem, but I am very new to this, and tried to do something I thought simple, but turns out it is not.
In my app_ui.R
file I have a tab structure like this:
ANSWER
Answered 2021-Oct-13 at 06:17I reduced your code to the needed minumum and modified the code from here to work on a tabsetPanel
instead of a navbarPage
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install shinyalert
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page