shinyFeedback
shinyFeedback copied to clipboard
JS error when showing/hiding feedback on non existent elements
If we call hideFeedback
or showFeedback*
with inputId
of nonexistent element, a JS error is throw like on the screen below.
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 https://github.com/merlinoa/shinyFeedback/commit/5cc4d16d53d8262ff1a4d67cbfeee0c88cedf60e