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

Fixes withSitecoreContext typescript definition #347

Merged

Conversation

pedrolamas
Copy link
Contributor

Description

The current typescript definition is forcing the component to have props of type ComponentConsumerProps instead of just forcing to extend that type.

Motivation

Components should be able use more properties that the ones just on ComponentConsumerProps, this fixes that

How Has This Been Tested?

Typescript doesn't complain any more and tests pass. Assuming that users are actually including the context properties in their component props, there should be no impact.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read the Contributing guide.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.

Copy link

@devilishgoat devilishgoat left a comment

Choose a reason for hiding this comment

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

Looks good to me

@sc-illiakovalenko sc-illiakovalenko merged commit bf31472 into Sitecore:dev Apr 2, 2020
@pedrolamas pedrolamas deleted the pedrolamas/context-ts-fix branch April 2, 2020 11:00
sc-illiakovalenko added a commit that referenced this pull request Jul 27, 2020
* Fix bug #349 typings for Placeholder prop functions render, renderEach, renderEmpty (#350)

* Fixes withSitecoreContext typescript definition (#347)

* v14.0.0

* [React sample] Cannot read property 'fields' of undefined

* [React sample] version fix

* v14.0.1

* [Doc] Remove mentioning that Sitecore JSS Forms are not working in headless mode + provide workaround
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.

None yet

3 participants