Skip to content

Shorthand notation for inputs' choices argument #181

@nteetor

Description

@nteetor

Shiny by default uses a shorthand notation for inputs.

radioButtons(
  inputId = "radio1",
  label = "Radio input",
  choices = c(
    `Choice 1` = 1,
    `Choice 2` = 1
  )
)

Yonder does not currently support this, but given #180, possible changes to buttonGroupInput()s, and possible changes to navInput()s I think it'd be a good idea to support this shorthand.

Instead of modifying the behaviour of choices, a new argument could be added. Possible names of the top of my head: pairs, choices_values, items.

@emmanuelsegui, have you found the required usage of choices + values cumbersome? Are there instances when specifying a named list of values would have been useful or more intuitive?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions