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

Clone all form, inputs, hidden inputs inside table. #10

Open
MidnightLady opened this issue May 23, 2019 · 7 comments
Open

Clone all form, inputs, hidden inputs inside table. #10

MidnightLady opened this issue May 23, 2019 · 7 comments

Comments

@MidnightLady
Copy link

First, thank you for great work !
I can freeze header perfectly, But it's not work well with inputs in tbody, cause it cloned tbody too, no matter what all I need is header freezing only.

@MidnightLady
Copy link
Author

MidnightLady commented May 23, 2019

This way I fix the problem:

  • Move form and hidden inputs outside div table.
  • Create tr style="display:none" in tbody, and using fastMode

Hope next version will support form, hidden input in some ways.

@yidas
Copy link
Owner

yidas commented May 24, 2019

Hi @MidnightLady,

What happen to the cloned inputs? Does it overflow?

@estani
Copy link

estani commented Nov 4, 2019

Thre are 2 workarounds I found.

  1. call $('.freeze-table').freezeTable('update'); which syncs the input/form fields (sending twice as much information but always the right one).
  2. remove the name tag from all clones tbody inputs: $('.clone-head-table-wrap tbody input, .clone-column-table-wrap tbody input').attr('name', null), not sure I can trust this classes since thy are not documented. It probably still breaks if input fields are in the header.

@JohanFredrikVaren
Copy link

Had everything working out of the box with this thing, until I tried posting the input elements in my table. All input elements have been cloned multiple times, resulting in empty values on the server side. Tried to call $('.freeze-table').freezeTable('update'); like the examples say and @estani suggests, but this only resulted in the JS error Uncaught TypeError: Cannot read property 'freezeHead' of undefined. Throwing this one out in favor of something that'll work with forms.

@EugenGedroyc
Copy link

the script not cloning "eventListeners" for the all inputs

@ardiansyah25
Copy link

i have this problem to any one can tell me how to fix it ?

@MidnightLady
Copy link
Author

i have this problem to any one can tell me how to fix it ?

I shared my fix already

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

No branches or pull requests

6 participants