-
-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
Description
What happened?
tm_t_crosstable output is not updated when filter is applied:
https://insightsengineering.github.io/teal.modules.general/latest-tag/reference/tm_t_crosstable.html#examples-in-shinylive
Upon investigation, I believe this is because of this line:
https://github.com/insightsengineering/teal.modules.general/blob/main/R/tm_t_crosstable.R#L318
The qenv object created with this line is not a reactive object so only got evaluated once even though data() changes.
Once I made this into a reactive object, the module works as expected:
The update code for that line:
qenv <- reactive({
teal.code::eval_code(data(), 'library("rtables");library("tern");library("dplyr")') # nolint quotes
})
anl_merged_q <- reactive({
req(anl_merged_input())
qenv() %>%
teal.code::eval_code(as.expression(anl_merged_input()$expr))
})The PR related to this changes is:
#847
We need to double check again all modules, fix, and do a patch release.
llrs-roche

