Saving the order in the database
- Dominant language
- JavaScript
- Stars
- 4.3k
- Forks
- 324
- PR merge metrics
- No merged PRs in 30d
Description
Hi everybody,
Does anybody know how to save the position of the elements after dragging in the database with ajax (in a column position) ?
With an another configuration, i used :
$(function() {
$("container_with_all_images").sortable({
update: function(e, ui){
ui.placeholder.height(ui.item.height());
Rails.ajax({
url: $(this).data("url"),
type: "PATCH",
data: $(this).sortable('serialize')
});
}
}).disableSelection();
});
Thx !
Jean
Contributor guide
Research direction
No repository file, test, or entry point is named. Start by reviewing the sortable update callback, Rails.ajax request, data-url, and sortable serialization shown in the issue; the work would need a specified persistence endpoint and an agreed definition of how the saved positions should be verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100