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)
- Client error console prevents apps with matching input and output IDs
- Client error console and inserted/removed UI elements HOT 1
- Client error console issue with dynamic bslib accordions
- Should check for overlapping input and output binding IDs, and only enable error console in local development
- Unnesting an reactive Value to GGplot breaks HOT 1
- reactives running and trigger observers without open the tab
- Shiny is not releasing memory HOT 2
- Can't Open Chrome Driver in shinyapps.io
- Load plot upon launching Shiny app HOT 1
- shiny.autoreload does not work when runApp is given shinyApp result or a list HOT 1
- Reactive selectizeInput box fail to update correctly in Shiny 1.8.0, first value of previous allowed choices are kept HOT 2
- Update jQuery version to 3.7.1
- 'make' not found HOT 3
- Use req() in checkFunction ReactivePoll HOT 5
- v1.8.0: Unable to highlight multiple selected values at once in selectInput/selectizeInput HOT 1
- How to use `Shiny.bindAll` for a DT table? HOT 8
- Why updateDateInput() nor dateRangeInput() don't have the datesdisabled parameter enabled? HOT 1
- Error in init.ts when using library(jsTreeR) HOT 3
- Shiny server not supporting http range requests. This disables seekbars for locally (www folder) hosted media files. HOT 2
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.