Comments (2)
Clearly I had not diagnosed the problem well: this is a problem of how selectInput interacts not with sapply,
but with DT:
# Testing interaction with sapply without table:
Values <- list(Test_1 = NA, Test_2 = NA)
ui <- fluidPage(
titlePanel(tag("u", "Test"), "Test"),
h3("Is just sapply working?"),
selectInput("Test_1", "", as.character(1:5), "1", width = "100px"),
selectInput("Test_2", "", as.character(1:5), "1", width = "100px"),
actionButton("saveBtn", "Save"),
br(),
)
server <- function(input, output, session) {
sapply(1:2, function(x) {
id <- paste0("Test_", x)
observeEvent(input[[id]], {
cat(input[[id]], "\n")
Values[[id]] <<- input[[id]]
}, ignoreNULL = FALSE)
})
observeEvent(input$saveBtn, { stopApp() })
session$onSessionEnded(function() { stopApp() })
}
print(shinyApp(ui, server))
Values
# -> This works.
As a consequence, I have renamed the thread.
from shiny.
See #3979
There are two options: either you set selectize=FALSE
in selectInput
. Or if you want to use selectize
, you have to get and include the HTML dependency and to initialise the select inputs - see the above linked issue.
from shiny.
Related Issues (20)
- With Bootstrap 5, `uiOutput()` doesn't dim in opacity when recalculating
- Plot overlaps onto tab panel. HOT 2
- shiny > 1.8.0 breaks tags$button reactivity HOT 6
- Set outputOtions at assignment
- Long running Shiny app starts printing lots of "nothing to compact" messages HOT 2
- Allow `OnUnhandledError` to be scoped to modules
- Warning: Error in ggplot2::geom_boxplot: Problem while converting geom to grob.
- Nested future-promises lose reactive context
- Problem with chromote package HOT 1
- dynamically creating multiple server module objects results in duplicate named servers HOT 2
- Updating reactive value on a timer results on JS error
- The issue of setting updateSelectInput's selected parameter to null HOT 3
- Parent container created by `shiny::tabPanel()` not taking full vertical container space
- Shiny Getting Started Tutorial missing `textOutput('selectedVar')` from example HOT 2
- Feature request: Add option to change radioButtons appearance similar to actionButtons
- R Shiny does not open a model training in Python HOT 1
- App with no outputs never stops pulsing
- shiny app examples crashes without error HOT 6
- observeEvent does not trigger to changes in reactiveValues HOT 4
- Can't add another ExtendedTask while the one is running? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shiny.