Shiny module chain: "input" module has "submit" button and returns multiple outputs that are used by the "output" modules.

Hi everyone,

I would like to build an app that has an "input module" that will prepare the data according to user input. A simple example would have the user input the minimum and maximum MPG to keep in the mtcars. In this case, the "input module" would return three values: thefiltered mtcars dataset, the minimum MPG and the maximum MPG.

Multiple output modules would use the output of the input module. Let's say the first module, generates table1, which is simply a DT::datatable of the filtered data. We also want to print the minimum and maximum MPG in the table title.

Here is what I have managed to get to work:
a) input module has "submit" button but returns a single value (the filtered mtcars data) CODE HERE
b) input module doesnt have a "submit" button and returns a list of values (the filtered mtcars data, minimum mpg and maximum mpg). CODE HERE

What I havent managed to get to work is this:
c) input module has a "submit" button AND returns a list of values. CODE HERE

That code gets the following error:

Listening on http://127.0.0.1:4493
Warning: Error in $: object of type 'closure' is not subsettable
52: is.reactive
50: mod_table1Output_server [#2]
49: server [#16]
Error in data$df : object of type 'closure' is not subsettable

I think data$df is NULL when the Table1Output module tries to get it and I havent clicked the "submit" button yet. Not sure how to fix this though.

(crossposted at stackoverflow here )

Solved : the list doesnt have reactive items because it depends on the "go" button.

gist