-
Notifications
You must be signed in to change notification settings - Fork 385
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
load more functionality for nested child #625
Comments
Not sure what you are asking here? Rendering 1000s of nested children will always take time. That is why in general we use pagination? Or do you believe cocoon is making the rendering extra slow? Which could be the case if you would render the With regards to pagination there are some popular gems, off the top of my head I have used will_paginate, kaminari and recently pagy. |
@nathanvda thanks for the quick response. here is the association used in my case hope you can see this meaning full. Models => my form is rendered with the following associations assessment has many steps so in my case, I have Parent as Assessment which has 5 steps and each step has 400 items all rendered through cocoon as nested form. |
@nathanvda here is what my view looks like. I have loaded very short record because it takes to much time for which record am facing a page unresponsive issue. for more details am mentioning that the form with green left border is in thousands due to which browser gets an unresponsive error. |
I am sorry, you are right. Cocoon's intention is to edit a single form with all it's nested children (and then their nested children etc.etc.) in one go. This of course does not make a lot of sense if you have 1000's of children (and their nested children). So I think in this particular case cocoon (or the 1-form approach) is not the best. |
@nathanvda yes exactly but is there any possibility that we add a limit for nested children that children for the given limit should be rendered via page load and then jquery should append the rest of the records in the background or something better to reduce the page load? it would be very helpful if there is any already solution or any direction for me to so I can change or add something :) |
@hafizabdulbasit have you found any solution? I kinda have very similar situation. Rendering takes 18121ms,
method. For example if it will make request to backed for template to put instead of loading it in @nathanvda any thoughts would be very welcome thumb up thumb up thumb up smile |
I am facing an issue with loading the edit page where the parent has thousands of nested children it breaks the page while rendering the HTML.
the query is already optimized and the server does not take a lot of time to process the records it's the HTML that is rendered multiple times and makes the web page irresponsive.
the main question is can we add something like
load more
which fetches the data with ajax and appends it to the parent so that the page doesn't get broken?@nathanvda anything you can suggest or direct me to something if this is already done?
The text was updated successfully, but these errors were encountered: