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

Adding resources not on page 1 of library broken #507

Closed
clash99 opened this issue Jul 25, 2016 · 2 comments
Closed

Adding resources not on page 1 of library broken #507

clash99 opened this issue Jul 25, 2016 · 2 comments
Assignees
Labels
Milestone

Comments

@clash99
Copy link
Contributor

clash99 commented Jul 25, 2016

When I try to connect a resource that is not on page 1 of the library, it overwrites all the other resources and just connects to the ones on that page. Ideally all the resources selected on every page of the library would be added to the entity.

Video: http://screencast.com/t/CpzxYuJMA

@clash99 clash99 added the bug label Jul 25, 2016
@ian-ross ian-ross added this to the Post July Release Sprint milestone Jul 26, 2016
@seav
Copy link
Contributor

seav commented Jul 30, 2016

I've looked a bit into this and this is caused by the (default?) DataTables behavior. When it manipulates the table pages, it actually removes the rows from the DOM, instead of hiding them via CSS. This means that when the form is submitted, only the visible rows get sent to the server leading to this bug.

I'll see if there's a way to use CSS-hiding instead of DOM manipulation. Otherwise, we need to add JavaScript to place hidden input fields corresponding to the selected resources prior to form submission.

seav added a commit that referenced this issue Jul 30, 2016
@seav
Copy link
Contributor

seav commented Jul 30, 2016

I checked the DataTables reference, and there doesn't seem to be any way to use CSS instead of DOM manipulation. Anyway, I think this is done for performance reasons: Loading an AJAX-powered paged table containing 10,000 rows would take a long time to generate the DOM nodes instead of on-the-fly DOM generation as rows are paged in and out.

So adding JavaScript seems the best way to go.

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

No branches or pull requests

4 participants