Skip to content

[Feature Request]: Splitting values into multiple inputs with teal.picks #14

@llrs-roche

Description

@llrs-roche

Feature description

Many modules have a pattern that is the selection of a variable and then some comparison of the values on it: Usually there is a control/reference group and then other groups (treatment or all the other groups):

Image Image

How we implement that with picks being used to select the variable?

If we use picks for the variable selection then the UI will be different between variables and the values used for the comparison.

var = picks(dataset(...), variables(...))
control = selectInput()
treatment = selectInput()

If we internally use picks to select all of them we can end up with a similar looking UI but the user could select the same variable on control and treatment (if we don't add some validation):

var = picks(dataset(...), variables(...))
control = c(var, values(selected = 1))
treatment = c(var, values(selected = 2))

My personal opinion is that with the second approach we can create a function/widget on teal.picks that does that validation automatically. We could detect automatically what's on the control/reference group and extract it from the other choices.

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions