Skip to content

Commit f4cfb61

Browse files
committed
fix: pagination range update
1 parent 63aa460 commit f4cfb61

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/app/components/layout/Pagination.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ class Pagination extends Component<PaginationProps, PaginationState> {
4343
*/
4444
public componentDidUpdate(prevProps: PaginationProps): void {
4545
if (this.props !== prevProps) {
46+
const paginationRange = this.updatePaginationRange();
4647
this.setState(
47-
{ paginationRange: this.updatePaginationRange() },
48+
{ paginationRange },
4849
() => this.setState(
49-
{ lastPage: this.state.paginationRange[this.state.paginationRange.length - 1] as number }
50+
{ lastPage: paginationRange[paginationRange.length - 1] as number }
5051
)
5152
);
5253
}

0 commit comments

Comments
 (0)