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

Fix broken x-if element initialization #324

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

calebporzio
Copy link
Collaborator

In the following snippet, before this PR, "foo" was never getting set to "baz". Now it is.

<div x-data="{ show: false, foo: 'bar' }">
    <h1 x-on:click="show = ! show"></h1>

    <template x-if="show">
        <h2 @click="foo = 'baz'"></h2>
    </template>

    <span x-text="foo"></span>
</div>

Verified

This commit was signed with the committer’s verified signature.
AmineChikhaoui Amine Chikhaoui
@calebporzio calebporzio merged commit f309052 into master Mar 31, 2020
@calebporzio calebporzio deleted the fix-broken-nested-bindings branch June 11, 2021 15:36
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

Successfully merging this pull request may close these issues.

None yet

1 participant