Skip to content

Commit 2dfa1af

Browse files
author
danil.moroz
committed
CC-7652: Attributes are deleted from a product when you filter them and save
1 parent 588f011 commit 2dfa1af

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

assets/Zed/js/modules/product-attribute.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -460,24 +460,24 @@ $(document).ready(function() {
460460
}
461461
});
462462

463-
$('#saveButton').on('click', function(event, ui) {
464-
attributeManager.save();
465-
});
466-
467463
$("#attribute_values_form").submit(function(e) {
468464
e.preventDefault();
469465
return false;
470466
});
471467

472-
473-
$('#productAttributesTable').DataTable({
468+
var productAttributesTable = $('#productAttributesTable').DataTable({
474469
'columnDefs': [{
475470
'targets': -1,
476471
'orderable': false
477472
}],
478473
destroy: true
479474
});
480475

476+
$('#saveButton').on('click', function() {
477+
productAttributesTable.search('').draw(false);
478+
attributeManager.save();
479+
});
480+
481481
$('#attribute_form').on('keypress', function(e) {
482482
var keyCode = e.keyCode || e.which;
483483
if (keyCode === 13) {

0 commit comments

Comments
 (0)