Skip to content

Client error console issue with dynamic bslib accordions #3945

Closed

Description

@gadenbuie

I'm opening this here to triage, this is most likely another variant of #3944, or it could be another issue entirely.

Steps to reproduce:

  1. Run 306-accordion-add-remove from shinycoreci
  2. Remove one letter from the "Displayed sections" panel, e.g. remove B.
  3. Add the removed panel back.
  4. Click the checkbox "Allow multiple panels to be open" to deselect the setting.
  5. Observe the client error console: The following ID was repeated: "acc": 2 inputs
Kapture.2023-11-28.at.12.24.29.mp4

What's interesting is that adding the panel calls accordion_panel_insert(). Without this (e.g. if you skip step 3) the client error isn't displayed. Moreover, this error isn't shown when the accordion_panel_insert() happens, it's shown when input$multiple is toggled (step 4), which calls renderUI() to create an entirely new accordion(id = "acc").

Also, if you repeat steps 2 and 3 n times before toggling input$multiple, the client error will report n + 1 repeated "acc" input IDs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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