Skip to content

Commit cad44a3

Browse files
committed
15210-Fixed product tier pricing pagination issue in admin
1 parent e65dac4 commit cad44a3

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

app/code/Magento/Catalog/view/adminhtml/web/js/components/dynamic-rows-tier-price.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,32 @@ define([
2828
});
2929

3030
this.labels(labels);
31+
},
32+
33+
/**
34+
* Change page
35+
*
36+
* @param {Number} page - current page
37+
*/
38+
changePage: function (page) {
39+
this.clear(); /* Clear the children when directly edit the text field */
40+
if (page === 1 && !this.recordData().length) {
41+
return false;
42+
}
43+
44+
if (~~page > this.pages()) {
45+
this.currentPage(this.pages());
46+
47+
return false;
48+
} else if (~~page < 1) {
49+
this.currentPage(1);
50+
51+
return false;
52+
}
53+
54+
this.initChildren();
55+
56+
return true;
3157
}
3258
});
3359
});

0 commit comments

Comments
 (0)