Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be able to extract value of components in UI #40

Open
cicdguy opened this issue Aug 5, 2021 · 2 comments
Open

Be able to extract value of components in UI #40

cicdguy opened this issue Aug 5, 2021 · 2 comments

Comments

@cicdguy
Copy link
Contributor

cicdguy commented Aug 5, 2021

In tmc (utils.R) we have to break encapsulation to see what values are selected in the UI

extract_input <- function(varname, dataname, filter = FALSE) {
  if (filter) {
    paste0(varname, "-dataset_", dataname, "_singleextract-filter1")
  } else {
    paste0(varname, "-dataset_", dataname, "_singleextract-select")
  }
}

NEST/teal.modules.general/issues/905 and possibly other shared code in the future.

This issue is to allow this behaviour without breaking encapsulation (it may involve adapting what we have e.g. a flag as to whether to return what we do now, or also the raw selected values, it may involve replacing with a simple select component in teal.devel to be created which doesn't interact with data) and then to create an issue in tmc to fix this.

NEST/teal.devel/issues/404 at the same time

Provenance:

Creator: nikolas-burkoff
@gogonzo
Copy link
Contributor

gogonzo commented Jan 19, 2022

Please note that extract_input method is present in teal.devel, teal.modules.clinical (public) and teal.modules.general. Please resolve these duplicates

@gogonzo gogonzo transferred this issue from another repository Apr 8, 2022
@nikolas-burkoff
Copy link
Contributor

So I believe we can do this now see e.g. here but some comments:

  1. We don't always do it e.g. https://github.com/insightsengineering/teal.modules.clinical/blob/main/R/tm_t_pp_laboratory.R#L397-L402
  2. It's quite clunky to get this information out
  3. Sometimes we actually want the output from the merge instead - i.e https://github.com/insightsengineering/teal.modules.clinical/blob/main/R/tm_t_coxreg.R#L824 which is very very clunky and it's not obvious to module developers which they should be using when...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants