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

Fix support of floaterProps.getPopper #926

Closed
wants to merge 2 commits into from

Conversation

andreash82
Copy link

Fixes #875

Changed order of props passed to Floater to avoid overriding mandatory internal stuff by provided floaterProps, chained internal function to call of provided floaterProps.getPopper.

Extending PropTypes was required due to lint settings.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 22, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2983ec9:

Sandbox Source
React Configuration
elastic-varahamihira-6md2d2 Issue #875

@gilbarbara
Copy link
Owner

Hey @andreash82

The issue you mentioned is using floaterProps on the component, not the step. How are they connected?

Also, can you add tests for this new behavior?

@andreash82
Copy link
Author

How are they connected?

The floaterProps on the Joyridecomponent are passed through to the component Step (as documented under Step -> Common Props Inheritance), so i just fixed the part inside the Step component where it had an actual effect due to incorrect property order (combined with property expansion) on <Floater ... getPopper={this.setPopper} ... {...step.floaterProps}> .

The call of floaterProps.getPopper inside Step's setPopper was added so that the passed function is called at all (and not ignored) with the new property order.

Also, can you add tests for this new behavior?

The "hard" part, since floaterProps aren't covered at all yet. A task for my weekend ;)

@sonarcloud
Copy link

sonarcloud bot commented Oct 27, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@gilbarbara
Copy link
Owner

Fixed in 2.7.2
Thanks

@gilbarbara gilbarbara closed this Dec 23, 2023
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.

Using floaterProps.getPopper stops lifecycle events from triggering
2 participants