Use reactiveValues with modules

I wasn't able to solve the problem using reactiveValues.
But after some pondering I found a neater way that I´ll share in principle here in case someone has a similar problem:

Instead of setting a reactiveValue like in the code above

rvals$carfilter <- base_data[row, "rowname"]

I now use the row click event to simply manipulate the value of a text input like so

dataview <- function(input, output, session, base_data, mysession) {
    # [...]
    # in row click event:
    updateTextInput(session=mysession,inputId="carfilter",
        value= as.character(base_data[row, "rowname"]))
    # [...]
}

Note that I didn´t get this to work by using the regular session parameter of the module`s server function but had to introduce a seperate session parameter ("mysession" in the example) and then call the module like so:

callModule(dataview, id="all_cars",base_data = mycars, mysession=session)

Now that input, manipulated using elements generated by potentially many different modules, can be used in a regular reactive expression:

mydata <- reactive({
    mycars %>% filter(rowname %in% input$carfilter)
})

This input will be evaluated in the regular reactive process even though it is hidden from the user (e.g. by simple css display: none), which is a prerequisite in my real application, where the actual identifier used to filter data for a module is a cryptic GUID.

I won't go into using those regular reactive expressions in modules. For that I recommend the "Modularizing Shiny app code" talk at the 2016 Shiny Developers Conference, minute 50 onwards.