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

Pagination fires deprecation warning by default #6311

Closed
2 tasks done
emyarod opened this issue Jun 18, 2020 · 3 comments · Fixed by #6312
Closed
2 tasks done

Pagination fires deprecation warning by default #6311

emyarod opened this issue Jun 18, 2020 · 3 comments · Fixed by #6312

Comments

@emyarod
Copy link
Member

emyarod commented Jun 18, 2020

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

Following this change, it seems like it's now impossible to use <Pagination> without raising a deprecation warning. If we set the pageInputDisabled prop to true or false, we get the warning. If we set it to null or undefined, or omit it entirely, it defaults to false and we get the warning. This is a problem for us because our unit tests fail if warnings or errors are raised. Any suggestions?

originally reported by @s100 in #6070 (comment)

@s100
Copy link
Contributor

s100 commented Jun 18, 2020

If anybody else is having this problem, at the moment we are working around it by manually deleting the default prop prior to using the component:

import { Pagination } from 'carbon-components-react'

delete Pagination.defaultProps.pageInputDisabled

// then use <Pagination> like normal

@aviral2311
Copy link

Could anyone help me in figuring out which version got this fix?

@tw15egan
Copy link
Collaborator

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

Successfully merging a pull request may close this issue.

4 participants