Skip to content

bug(ui): All closed panels for ui.accordion(multiple=True)'s input value should be (), not None #2113

@schloerke

Description

@schloerke

A possible side-effect is that, if restore_input returns None, now the first panel will be open. (Old behavior was that all panels would be closed.) It's unclear whether restore_input would ever return None or what the expected behavior should be.

When all panels are closed on a multiple=True accordion, currently, the shiny input value is None.

Proposal:

  • When all panels are closed, the input value should be an empty tuple (). (**asking team IRL if this is a good idea)
  • or When all panels are closed, the value stays as None, but you'll need to restore the restore_input logic as it will restore a None value.

Originally posted by @schloerke in #2112 (comment)

Requires: rstudio/bslib#1252

Using a shiny input handler (or different input value being sent from browser), we should use an empty tuple, and not None. This will help distinguish between empty and missing value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions