Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS error when showing/hiding feedback on non existent elements #65

Open
bartekch opened this issue May 4, 2022 · 0 comments
Open

JS error when showing/hiding feedback on non existent elements #65

bartekch opened this issue May 4, 2022 · 0 comments

Comments

@bartekch
Copy link

bartekch commented May 4, 2022

If we call hideFeedback or showFeedback* with inputId of nonexistent element, a JS error is throw like on the screen below.
image

This is NOT causing any issues in Shiny app itself, so it has little importance, but I'm bringing this up anyway since it may surprise someone checking the console.

Example

library(shiny)
library(shinyFeedback)
shinyApp(
  ui = basicPage(
    shinyFeedback::useShinyFeedback(),
    actionButton("b", "Throw JS error")
  ),
  
  server = function(input, output, session) {
    observe({
      input$b
      shinyFeedback::hideFeedback("input")
      shinyFeedback::showFeedbackSuccess("input")
    })
  }
)

Checked with version 5cc4d16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant