-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
Version
3.3.0-beta.4
Environment
Vue 3.2.36
Reproduction link
Steps to reproduce
open the sandbox:
- click Toggle button
- check the console
- TestA and TestB always rerender on every toggle, although they are used with v-show
What is expected?
Children components of Space do not rerender on every toggle.
What is actually happening?
Children components with v-show always rerender, so they will lost their internal state.
This only happens when the children have both v-if and v-show. The children with v-show should not rerender.
I explored the source code, and found that if I change
const items = filterEmpty(slots.default?.());
to
const items = slots.default?.() ,
the problem disappeared.
But I don't think this is the reason.
CCherry07