我正在尝试使用shinyFeedback
. 我使用来自shinyWidgets
. 这两个似乎不能一起工作。下面是一个表示可以shinyFeedback
正常工作numericInput
但不能正常工作的代表autonumericInput
。
有什么技巧可以让这两者一起工作吗?
library(shiny)
library(shinyWidgets)
library(shinyFeedback)
ui <- fluidPage(
useShinyFeedback(),
numericInput(
"numeric_input", "numeric_input",
value = 1e6, min = -Inf, max = Inf
),
autonumericInput(
"autonumeric_input", "autonumeric_input",
value = 1e6, currencySymbol = "€", currencySymbolPlacement = "p", decimalPlaces = 0, digitGroupSeparator = " "
),
)
server <- function(input, output, session) {
observeEvent(input$numeric_input, {
feedbackWarning("numeric_input", show = input$numeric_input >= 0, text = "Hello numeric_input")
})
observeEvent(input$autonumeric_input, {
feedbackWarning("autonumeric_input", show = input$autonumeric_input >= 0, text = "Hello autonumeric_input")
})
}
shinyApp(ui, server)