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

Q-Tab-Panels and native form post #7147

Closed
JTrotta opened this issue Jun 3, 2020 · 3 comments
Closed

Q-Tab-Panels and native form post #7147

JTrotta opened this issue Jun 3, 2020 · 3 comments

Comments

@JTrotta
Copy link

JTrotta commented Jun 3, 2020

Describe the bug
Using native form, with tab-panels. Only visible tab input fields are posted to the controller

Codepen/jsFiddle/Codesandbox (required)
The problem is only visible on Asp.net controller.

To Reproduce
Steps to reproduce the behavior:

  1. Add two q-tab-panels Each tab gots input fields to be posted using a native form. Add keep-alive property.
  2. Insert data into first tab input fields,
  3. Then modify second tab input fields.
  4. Posting the form, only the second tab (the visble one) fields values are posted. The first tab fields are not.

Expected behavior
All data should be posted to the controller

Screenshots
If applicable, add screenshots to help explain your problem.
image

Platform (please complete the following information):
OS: Windows/Linux
Node:---
NPM:---
Yarn:---
Browsers:---
iOS:--
Android:---
Electron:---

Additional context
NN

@rstoenescu
Copy link
Member

rstoenescu commented Jun 3, 2020

Hi,

This is by design due to how QTabPanels (efficiently) work. There's lots to talk about on this subject, but bottom line: don't use QTabPanels (only current tab panel is present in DOM) when designing your UI for this particular goal.

@JTrotta
Copy link
Author

JTrotta commented Jun 3, 2020

What a pity. Tab panel is the most used component for this kind of UI.
Is it possible to upggrade it with a kinf of boolean property to just hide unvisible panels instead of delete it from DOM? Just a suggestion.
Thank you

@pdanpdan
Copy link
Collaborator

pdanpdan commented Jun 3, 2020

If you just want to show/hide parts of the UI you don't need any component - put your content and show/hide it with v-show based on the selected tab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants