Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
karangattu opened this issue Dec 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@karangattu
Copy link
Collaborator

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)
@karangattu karangattu added the bug Something isn't working label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant