简体   繁体   中英

Using an updated variable inside renderUI

I was having problems with using variables inside renderUI and after looking around, it seems like the problem is that it doesn't read a variable like normal, so I'm looking for solutions

lets say I have a variable called modelname

in the renderUI, if a radio button was selected, it will display several different pages depending on another radio button, but each one will have multiple downloadLinks.

What I would like is some way to set modelname to something for each combination, so that I can make a call to downloadHandler and use that modelname to access the right file.

Any ideas? Thanks

I would suggest that you post a code and produce a reproducible examples. Without looking at the code, I can only guess the the problem pertains to not addressing objects correctly, as you would have when following guidance in an article on scoping rules in Shiny . I would suggest that you define your variables in global.R as it usually makes Shiny apps less messy.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM