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

on:toggle of<details> does not work #565

Closed
takeisit opened this issue Feb 22, 2023 · 1 comment
Closed

on:toggle of<details> does not work #565

takeisit opened this issue Feb 22, 2023 · 1 comment

Comments

@takeisit
Copy link

Hi.

#[component]
fn DetailsTest(cx: Scope) -> impl IntoView
{
    let (open, set_open) = create_signal(cx, false);
    
    view!{cx,
        <details open=open on:toggle=move|e| {
            log!("on toggle!");
            set_open(event_target::<HtmlDetailsElement>(&e).open());
        }>
            <summary>"summary"</summary>
            <button on:click=move|_|set_open.set(false)>"collapse"</button>
        </details>
    }
}

Expected Behavior:
"on toggle!"s are output to console, when the details is toggled.

Actual Behavior:
no output

version: 0.2.0-beta
feature: csr

gbj added a commit that referenced this issue Feb 22, 2023
gbj added a commit that referenced this issue Feb 22, 2023
@gbj
Copy link
Collaborator

gbj commented Feb 22, 2023

Thanks, this should fix it.

@gbj gbj closed this as completed Feb 22, 2023
gbj added a commit that referenced this issue Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants