-
Notifications
You must be signed in to change notification settings - Fork 220
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
support for dynamically added elements #47
Comments
So I get the gist of it and I agree. GridForms should know of rows/fields added to the form after the library has been initialized. |
If we had a method to which we pass a dom reference of a element which has been added to the dom, this method should enhance the markup/add listeners. The method we have today does not take care that listeners arent appended several times etc |
I see a need for a refresh / re-render function that can be called after elements have been dynamically created, to allow correct calculation, as well as the listening that @staabm mentioned. |
@l-tree Would calling |
@kumailht Is there documentation on what that does? The rendering issues I have include positions of the input elements within data fields, as well as the field widths (they are close to zero) |
ATM gridforms will search the DOM at javascript-load-time and works with the elements found at init time all the time.
when elements get created via javascript after gridforms was loaded, gridforms will not take them into account.
either gridforms should detect wether elements have been inserted, or it should provide a method which can be called to re-fresh its
el.fieldsRows
,el.fieldsContainers
etc.at best one could give a parameter into this re-fresh method to make gridforms work inside this newly added elements instead of searching via DOM operations across the whole document.
The text was updated successfully, but these errors were encountered: