Comments (6)
Hello,
Are your inputs in a server-side renderUi?
Victor
from shinywidgets.
yes they are indeed. Just found out that using a conditional panel causes the same problem, so I realize its a fundamental flaw in my approach. Maybe better delete my post here since it's out of place here. If ok, I would send you an email in case you have a possible answer how to work around my issue?
from shinywidgets.
Yes that's the same :)
You need outputOptions
like below (comment/uncomment to see difference) :
library(shiny)
library(shinyWidgets)
ui <- fluidPage(
tags$h1("Dropdown & inputs"),
dropdownButton(
icon = icon("sliders"), status = "info",
uiOutput(outputId = "params")
),
verbatimTextOutput(outputId = "res")
)
server <- function(input, output, session) {
output$params <- renderUI({
tagList(
tags$b("Parameters:"),
sliderInput(inputId = "slider", label = "Slider", min = 1, max = 100, value = 4),
selectizeInput(inputId = "selectize", label = "Selectize", choices = letters),
radioButtons(inputId = "radio", label = "Radio", choices = month.abb[1:4]),
checkboxGroupButtons(inputId = "checkbox", label = "Checkbox", choices = month.abb[1:4])
)
})
# >>>>>>>> You need this line ! <<<<<<<<<
outputOptions(x = output, name = "params", suspendWhenHidden = FALSE)
output$res <- renderPrint({
reactiveValuesToList(input)
})
}
shinyApp(ui, server)
Victor
from shinywidgets.
Oh very elegant! I have come across that line of code long ago I remember now, but forgot about it. Much appreaciate the tip! Good luck with the continuation of your work on ShinyWidgets, I'm sure there are many interesting new features to be imagined to add 👍
from shinywidgets.
You're welcome :) Many thanks for your encouragement !
Best,
Victor
from shinywidgets.
Hey pvictor, I send an email to your address listed here a week ago with some suggestions fixes and follow up questions. Perhaps you missed it?
from shinywidgets.
Related Issues (20)
- virtualSelectInput hides element name when only one element for one group is present HOT 2
- HTML special characters in `choices` of `pickerInput` when using `choicesOpt`
- Not able to click whole button in quarto HOT 11
- `updateAirDateInput()` does not update selected date if options is used HOT 2
- Spinner remains visible when rendering DT HOT 2
- [docs] deprecated docs in switchInput() HOT 1
- virtualSelectInput(..., multiple = TRUE, showValueAsTags = TRUE, updateOn = "close") -> Removing tags does not have an effect on `input$...` HOT 1
- `sliderTextInput` compatibility problem on Quarto doc in the argument `choices`. HOT 2
- `updateAirDateInput()` does not update value if no options provided HOT 2
- Button width not working in dashboard sidebar
- updateSliderTextInput() doesn't have a default argument for session HOT 1
- radioGroupButton rendered incorrectly by renderUI when used in conjunction with jsTreeR HOT 1
- updateAirDateInput() behaviour inconsistent when server and client timezones differ
- Bug: Special characters in virtualSelectInput HOT 2
- airDatePicker selecting dates works incorrectly in Docker container HOT 2
- Compatibility of WinBox with Dark Theme in bs4Dash HOT 1
- Choices max size? HOT 1
- `updateAirDateInput` does not fully overwrite `disabledDates` HOT 2
- Virtural select input dropdown appears behind slider inputs HOT 2
- Calling `show_toast` before previous toast disappears causes "Duplicate IDs found" error to appear
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 shinywidgets.