Skip to content

Commit

Permalink
ENGCOM-4422: [Backport] Fixed pagination issue in admin review grid #…
Browse files Browse the repository at this point in the history
  • Loading branch information
sivaschenko authored Mar 4, 2019
2 parents 0982a53 + f3c9589 commit 082368d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/web/mage/adminhtml/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,13 +530,20 @@ define([

/**
* @param {Object} event
* @param {*} lastId
*/
inputPage: function (event) {
inputPage: function (event, lastId) {
var element = Event.element(event),
keyCode = event.keyCode || event.which;
keyCode = event.keyCode || event.which,
enteredValue = parseInt(element.value, 10),
pageId = parseInt(lastId, 10);

if (keyCode == Event.KEY_RETURN) { //eslint-disable-line eqeqeq
this.setPage(element.value);
if (enteredValue > pageId) {
this.setPage(pageId);
} else {
this.setPage(enteredValue);
}
}

/*if(keyCode>47 && keyCode<58){
Expand Down

0 comments on commit 082368d

Please sign in to comment.