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

segmentedBar inside {#if}: second item disappears when condition is invalidated #113

Closed
matthieugicquel opened this issue Feb 23, 2020 · 1 comment · Fixed by #119
Closed

Comments

@matthieugicquel
Copy link

<button text="Tap me twice" on:tap="{() => show=!show}" />
{#if show}
  <segmentedBar>
    <segmentedBarItem title="Visible" />
    <!-- This second item is missing after tapping the button -->
    <segmentedBarItem title="Not Visible after the taps" />
  </segmentedBar>
{/if}
<script>
  let show = true;
</script>

Here's a nativescript playground

With the code above, only the first item is kept when show becomes false and then true.

As you can see in the playground, i found a workaround, but wanted to report the bug anyway.
If it's confirmed that this is unexpected behavior, I can try to investigate more and work on a fix, but since I'm new to this it may take some time :)

@halfnelson
Copy link
Owner

halfnelson commented Feb 23, 2020 via email

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 a pull request may close this issue.

2 participants