Skip to content

feat(Paginator): make scrollToTopOnPageChange optional#7212

Merged
hevele-moda merged 1 commit into
mainfrom
ECX-424
Jul 10, 2026
Merged

feat(Paginator): make scrollToTopOnPageChange optional#7212
hevele-moda merged 1 commit into
mainfrom
ECX-424

Conversation

@hevele-moda

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 10, 2026 09:42
@hevele-moda hevele-moda requested a review from a team as a code owner July 10, 2026 09:42
@hevele-moda hevele-moda merged commit e25c807 into main Jul 10, 2026
4 checks passed
@hevele-moda hevele-moda deleted the ECX-424 branch July 10, 2026 09:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Paginator component API to make scrolling to the top on page navigation configurable, while preserving the current default behavior.

Changes:

  • Added a new optional scrollToTopOnPageChange?: boolean prop (defaulting to true).
  • Wrapped existing window.scrollTo(0, 0) calls so they only execute when scrollToTopOnPageChange is enabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 9 to +13
interface Props extends React.HTMLAttributes<HTMLDivElement> {
selectedPage: number;
totalPages: number;
maximumPagesToShow?: number;
scrollToTopOnPageChange?: boolean;
Comment on lines 57 to +61
export const Paginator: React.FC<Props> = ({
selectedPage,
totalPages,
maximumPagesToShow = defaultMaximumNumberOfPagesToShow,
scrollToTopOnPageChange = true,
moda-automation-devops pushed a commit that referenced this pull request Jul 10, 2026
# [21.13.0](21.12.0...21.13.0) (2026-07-10)

### Features

* **Paginator:** make scrollToTopOnPageChange optional ([#7212](#7212)) ([e25c807](e25c807))
moda-automation-devops pushed a commit that referenced this pull request Jul 10, 2026
# [21.13.0](21.12.0...21.13.0) (2026-07-10)

### Features

* **Paginator:** make scrollToTopOnPageChange optional ([#7212](#7212)) ([e25c807](e25c807))
moda-automation-devops pushed a commit that referenced this pull request Jul 10, 2026
# [21.13.0](21.12.0...21.13.0) (2026-07-10)

### Bug Fixes

* new release ([3394b7e](3394b7e))

### Features

* **Paginator:** make scrollToTopOnPageChange optional ([#7212](#7212)) ([e25c807](e25c807))
moda-automation-devops pushed a commit that referenced this pull request Jul 10, 2026
# [21.13.0](21.12.0...21.13.0) (2026-07-10)

### Bug Fixes

* new release ([7d483c0](7d483c0))
* new release ([3394b7e](3394b7e))

### Features

* **Paginator:** make scrollToTopOnPageChange optional ([#7212](#7212)) ([e25c807](e25c807))
@moda-automation-ci

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 21.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants