v-show doesn't seem to work
See original GitHub issueThis doesn’t work as expected for me:
<template>
<view>
<text v-show="false">Hide this</text>
</view>
</template>
i.e. The “Hide this” text still shows up.
Also, the code example for v-show in the Vue Native documentation actually uses v-if
:
https://vue-native.io/docs/conditional.html#v-show
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
v-show doesn't work as expected - Stack Overflow
I found a specific solution for your example, where it can only be one selected item, feel free to adapt it. let vm...
Read more >What is the difference between v-show and v-if in Vue js
Both v-if and v-show are used to hide/display components, but in this article we are going to cover the details of when to...
Read more >v-if vs. v-show - Vue Conditional Rendering - LearnVue
In this tutorial, we'll take a look at what conditional rendering is, how v-if and v-show work, and when you should use each...
Read more >Why The Halo TV Show Isn't Working - Game Informer
Somehow, even with all the trappings, this Halo series just doesn't feel like Halo. Warning: The following opinion piece includes SPOILERS ...
Read more >VSCode plots wont show anymore anywhere - VS Code
The pane seems to have disappeared and I cant find how to get it back. ... Thanks for the vscodium link, but unfortunately...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For what it’s worth, I ran into this problem when attempting to use v-show to control the output of a child component that did NOT have a single top-level element. Wrapping the child component elements in a div gave me the expected behavior with v-show.
Also the documentation for
v-show
has this text: “v-show keeps the element on the View, and only adjusts the opacity to 0%, or transparent”.It might be better to toggle between
display: 'flex'
anddisplay: 'none'
in the style for a component, rather than changing the opacity of the view, i.e. similar to how v-show in Vue.js works.