Skip to content

Consecutive v-if stop reactive properties #127

Closed
@Tronix117

Description

@Tronix117

Whenever in the same hierarchy, there are multiple v-if, and a v-if become true, all reactive properties stop working altogether. This means all Vue reactive properties does not work anymore in the entire app, even if the page is destroyed. The only way is to reload the app.

As a workaround:v-if along v-else-if or v-else are not affected, v-show is also not affected.

The bug has been reproduced by @rigor789 .


This causes the issue:

Page
  StackLayout
    Label(
      v-if="foo"
      text="Enable"
      @tap="foo = false"
    )

    Label(
      v-if="!foo"
      text="Disable"
      @tap="foo = true"
    )

However this is working:

Page
  StackLayout
    Label(
      v-if="foo"
      text="Enable"
      @tap="foo = false"
    )

    Label(
      v-else
      text="Disable"
      @tap="foo = true"
    )

And this is also working:

Page
  StackLayout
    Label(
      v-show="foo"
      text="Enable"
      @tap="foo = false"
    )

    Label(
      v-show="!foo"
      text="Disable"
      @tap="foo = true"
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions