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

magento/magento2#39640: Issue with the Customizable Options grid on the product page in the admin panel #39694

Open
wants to merge 12 commits into
base: 2.4-develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions app/code/Magento/Ui/view/base/web/js/dynamic-rows/dynamic-rows.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2015 Adobe
* All Rights Reserved.
*/

/**
Expand Down Expand Up @@ -689,14 +689,16 @@ define([
* @param {Number|String} prop - additional property to element
*/
processingAddChild: function (ctx, index, prop) {
var newTotal,
newPages;

this.bubble('addChild', false);

if (this.relatedData.length && this.relatedData.length % this.pageSize === 0) {
this.pages(this.pages() + 1);
this.nextPage();
} else if (~~this.currentPage() !== this.pages()) {
this.currentPage(this.pages());
}
newTotal = this.relatedData.length + 1;
newPages = Math.ceil(newTotal / this.pageSize);

this.pages(newPages);
this.currentPage(newPages);

this.addChild(ctx, index, prop);
},
Expand Down