I am building a shiny application with multiple actionButtons. Out of many actionButtons, two of them behave weirdly and get triggered twice everytime user clicks on it. This is only observed on 2 actionbuttons, whereas the rest function well. My initial thought was, it got triggered by some reactive variable however, I removed all my code from the observeEvent and wrote only a print statement, it still triggers it twice. Is this a know bug ?
sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server 7.9 (Maipo)
Matrix products: default
BLAS: /opt/R/3.5.2/lib64/R/lib/libRblas.so
LAPACK: /opt/R/3.5.2/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] furrr_0.1.0 future_1.14.0 shinyjs_1.0 shinyWidgets_0.4.8.910 highcharter_0.7.0
[6] lubridate_1.7.4 writexl_1.1 reshape2_1.4.3 data.table_1.12.2 forcats_0.4.0
[11] purrr_0.3.2 readr_1.3.1 tidyr_0.8.3 tibble_2.1.3 ggplot2_3.2.0
[16] tidyverse_1.2.1 dplyr_0.8.3 plyr_1.8.4 jsonlite_1.6 openxlsx_4.1.0.1
[21] shinyalert_1.0 htmlwidgets_1.3 RODBCext_0.3.1 digest_0.6.20 stringr_1.4.0
[26] DT_0.7 RODBC_1.3-15 DBI_1.0.0 fulcrumlogging_1.0.2 shiny_1.3.2
loaded via a namespace (and not attached):
[1] httr_1.4.0 bit64_0.9-7 modelr_0.1.4 assertthat_0.2.1 TTR_0.23-4 blob_1.1.1
[7] cellranger_1.1.0 yaml_2.2.0 globals_0.12.4 pillar_1.4.2 backports_1.1.4 lattice_0.20-38
[13] glue_1.3.1 rlist_0.4.6.1 promises_1.0.1 rvest_0.3.4 colorspace_1.4-1 htmltools_0.3.6
[19] httpuv_1.5.1 pkgconfig_2.0.2 broom_0.5.2 listenv_0.7.0 haven_2.1.1 xtable_1.8-4
[25] scales_1.0.0 whisker_0.3-2 later_0.8.0 generics_0.0.2 withr_2.1.2 lazyeval_0.2.2
[31] cli_1.1.0 quantmod_0.4-15 magrittr_1.5 crayon_1.3.4 readxl_1.3.1 mime_0.7
[37] nlme_3.1-137 xts_0.11-2 xml2_1.2.0 shinydashboard_0.7.1 tools_3.5.2 hms_0.4.2
[43] odbc_1.1.6 munsell_0.5.0 zip_2.0.3 compiler_3.5.2 rlang_0.4.0 grid_3.5.2
[49] rstudioapi_0.10 crosstalk_1.0.0 igraph_1.2.4.1 codetools_0.2-15 gtable_0.3.0 curl_3.3
[55] R6_2.4.0 zoo_1.8-6 bit_1.1-14 stringi_1.4.4 parallel_3.5.2 Rcpp_1.0.1
[61] tidyselect_0.2.5
library(shiny)
ui <- fluidPage(
fluidRow(
column(3, shiny::actionButton("run_calculation", "Run Calculation")),
style = "background: #034FDB;font-family: Roboto, sans-serif;font-style: normal;font-weight: normal;font-size: 18px;
line-height: 20px"
)
)
server <- function(input, output, session) {
observeEvent(input$run_calculation, {
print(1)
})
}
shinyApp(ui, server)