diff --git a/serveradmin/servershell/static/js/servershell/command.js b/serveradmin/servershell/static/js/servershell/command.js index 8f239d9f..5d633994 100644 --- a/serveradmin/servershell/static/js/servershell/command.js +++ b/serveradmin/servershell/static/js/servershell/command.js @@ -445,9 +445,11 @@ servershell.commands = { // Avoid duplicate deletion ... if (!servershell.to_commit.deleted.includes(object_id)) { servershell.to_commit.deleted.push(object_id); - servershell.update_result(); } }); + + // Redraw once after marking all selected objects + servershell.update_result(); }, setattr: function(attribute_value_string) { if (!validate_selected()) { diff --git a/serveradmin/servershell/static/js/servershell/result.js b/serveradmin/servershell/static/js/servershell/result.js index 1551dd40..217c1b3b 100644 --- a/serveradmin/servershell/static/js/servershell/result.js +++ b/serveradmin/servershell/static/js/servershell/result.js @@ -13,6 +13,13 @@ servershell.update_result = function() { // Memorize currently selected objects to restore let selected = servershell.get_selected(); + // servershell is a Proxy (servershell.js): reading a configured property + // fires jQuery events and allocates a wrapper on each access. Snapshot the + // ones used per row into plain values so the render loop stays cheap. + let shown_attributes = [...servershell.shown_attributes]; + let changes = servershell.to_commit.changes; + let offset = servershell.offset; + // Recreate table header let header = table.find('thead tr'); header.empty(); @@ -22,7 +29,7 @@ servershell.update_result = function() { ) ); header.append('