Skip to content

Commit

Permalink
Fix table rows' cells
Browse files Browse the repository at this point in the history
  • Loading branch information
JD-Robbs committed Mar 2, 2016
1 parent 40ff345 commit cdf0bde
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/knockout-sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,16 @@
//keep a reference to start/update functions that might have been passed in
startActual = sortable.options.start;
updateActual = sortable.options.update;

//ensure traggable table rows' cells maintain their width while dragging
sortable.options.helper = function(e, ui) {
if (ui.is('tr')) {
ui.children().each(function() {
$(this).width($(this).width());
});
}
return ui;
};

//initialize sortable binding after template binding has rendered in update function
var createTimeout = setTimeout(function() {
Expand Down

0 comments on commit cdf0bde

Please sign in to comment.