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

can't hide/show n-form-item-gi with v-show #4644

Closed
FangDingli opened this issue Mar 27, 2023 · 4 comments
Closed

can't hide/show n-form-item-gi with v-show #4644

FangDingli opened this issue Mar 27, 2023 · 4 comments
Labels
untriaged need to sort

Comments

@FangDingli
Copy link

TuSimple/naive-ui version (版本)

2.34.3

Vue version (Vue 版本)

3.2.47

Browser and its version (浏览器及其版本)

Chrome Dev 113.0.5668.0

System and its version (系统及其版本)

Windows 11 Pro 22H2

Node version (Node 版本)

19.6.0

Reappearance link (重现链接)

https://github.com/FangDingli/naive-ui-grid-bugreport

Reappearance steps (重现步骤)

In initialize, this component is not show with v-show="false" and it will show with v-show="true".
When you want to hide it again, it's got error in console

Expected results (期望的结果)

n-form-item-gi can work fine with v-show

Actual results (实际的结果)

got error in console

Remarks (补充说明)

@github-actions github-actions bot added the untriaged need to sort label Mar 27, 2023
@ottocsb
Copy link

ottocsb commented Jul 13, 2023

Same question. The utilization of the :span=0 directive, similar to the conditional statementv-if, hinders the usage of the keep-alive feature for component persistence. While v-show allows the component to remain without triggering a re-render, it cannot be used simultaneously with :span=x.

@ottocsb
Copy link

ottocsb commented Jul 13, 2023

By employing the "layout-shift-disabled=true" attribute, it is possible to use "v-show" without issues. However, it should be noted that this approach may compromise the responsiveness of the layout, although no responsiveness-related issues have been encountered thus far.

@ottocsb
Copy link

ottocsb commented Jul 13, 2023

#4422

@jahnli
Copy link
Collaborator

jahnli commented Mar 12, 2024

This issue does not have any recent activity. If you are still experiencing similar problems, open a new error, including a minimal copy of the problem

@jahnli jahnli closed this as completed Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged need to sort
Projects
None yet
Development

No branches or pull requests

3 participants