Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fix react error from onSizeChange in the Pagination component #381

Merged
merged 2 commits into from
Jul 15, 2022

Conversation

feedm3
Copy link
Contributor

@feedm3 feedm3 commented Jul 12, 2022

Types of Changes

Prerequisites

Please make sure you can check the following two boxes:

  • I have read the CONTRIBUTING document
  • My code follows the code style of this project

Contribution Type

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue, please reference the issue id)
  • New feature (non-breaking change which adds functionality, make sure to open an associated issue first)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Description

Currently, the onSizeChange handler gets passed down with prop spreading to a different component. This leads to an error in the console, as the prop gets attached to a basic HTML element.
grafik

This fix removes the handler from the standard props before they are passed down.

  1. The handler was introduced here #373 add page size event to pagination component #374.
  2. It gets passed down into the PaginationLayout here: https://github.com/ZEISS/precise-ui/blob/main/src/components/Pagination/index.tsx#L216
  3. And added to a div here: https://github.com/ZEISS/precise-ui/blob/main/src/components/Pagination/PaginationLayout.part.tsx#L22

@CLAassistant
Copy link

CLAassistant commented Jul 12, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@klaidigorishti klaidigorishti left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for the fix!

@klaidigorishti klaidigorishti merged commit 0d86696 into ZEISS:main Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants