Skip to content

shiny.express.ui.accordion_panel() doesn’t work with insert_accordion_panel() , but shiny.ui.accordion_panel() does #1802

@karangattu

Description

@karangattu

When user tried to use insert_accordion_panel() withshiny.express.ui.accordion_panel(), the app throws an error - Unhandled error: 'RecallContextManager' object has no attribute 'resolve'

Reproducible code

Shinylive link

Workaround

use shiny.ui.accordion_panel() instead like this modified code

@reactive.effect
@reactive.event(input.add_panel)
def _():
    from shiny.ui import accordion_panel
    current_count = panel_counter.get()
    print(str(current_count))
    new_panel = accordion_panel(
        title=f"Panel {str(current_count)}",
        value=f"panel{str(current_count)}",
        icon=ui.HTML('<i class="fa-solid fa-plus"></i>'),
    )

    ui.insert_accordion_panel("acc1", new_panel)
    panel_counter.set(current_count + 1)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions