I am trying to use a shiny module based on certain conditions. into another UI. I tried this method. However the code is not important but it's fairly a simple one.
library(shiny)
source('www/Modules/CRUD_db.R')
source('www/Modules/mod_SQL_functions.R')
ui <- fluidPage(
uiOutput('some')
)
server <- function(input, output, session) {
sqlite<-reactive({
dbConnect(SQLite(),
'www/main_data.sqlite')
})
output$some<-renderUI(
mod_crud_ui("FUB")
)
callModule(mod_crud_serve,'user',sqlite())
}
shinyApp(ui, server)
But I get only the First part of the Module which is not reactive. I mean which is not dependent on anything else. This is how it looks
But it should look something like this
Where the right panel is based on the radio button if you change it it will change the panel like this
All I want to know is if I can user ModelUI function to generate UI in renderUI code on the server. If yes how if no how should I proceed to Make the module conditional