I am making a Shiny app in which there is a unique table and a lot of inputs to modify this table. Since almost all of these inputs are independent and I can classify them into categories, I created several modules, each containing several inputs.
However, since I have a single table to render (i.e only one tableOutput) and since I would like this table to be affected by all modules, I didn't put it in a particular UI module, but I have put one renderTable per server module.
There are several issues in this example. The first one is that nothing is rendered because output$test_mtcars is in server modules and hence, it is expected to have the complementary tableOutput in an UI module. The second one is that I'm not sure that both renderTable will be taken into account.
Is it possible to modify this single tableOutput with several modules? Merging the different UI modules together is not an option (I have separated the inputs in modules precisely because I have a lot of them).
Hi @nirgrahamuk, thank you for your answer. Your code works but I can't apply it to my situation. Indeed, the example in my post is made with a dataframe and using a list of different functions on it works well, but my real situation concerns {stargazer} table. I would like to modify a stargazer table (printed in HTML) with different options.
However, your code doesn't work for this because I can't apply several times the stargazer() function in a row. The example below works when there is only one module but adding one more function breaks it (uncomment the line in renderUI to see it).
Again, your answer is good and works with dataframes, it's just I didn't anticipate that this solution wouldn't work with stargazer tables. Do you know how to adapt your answer to this situation?
I finally found the solution, I just needed to return every input in a reactive expression in each module and use them in server part. I validate @nirgrahamuk's answer since it solves the problem detailed in my first post.