Skip to content

Commit

Permalink
fix(ui-pagination): fix pagination with numberinput when onBlur it ca…
Browse files Browse the repository at this point in the history
…lls onPage change every time, even where there are no changes

Closes: INSTUI-4239
  • Loading branch information
HerrTopi committed Sep 30, 2024
1 parent 4dc7cb2 commit d4dca02
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ class PaginationPageInput extends Component<
}

handleBlur = (event: React.FocusEvent<HTMLInputElement>) => {
this.setNewPage(event, Math.round(this.state.number))
if (Math.round(this.state.number) !== this.currentPage) {
this.setNewPage(event, Math.round(this.state.number))
}
}

getNumberWithinRange(n: number) {
Expand Down

0 comments on commit d4dca02

Please sign in to comment.