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

Avoid the empty div wrapper for 'null' custom controls #561

Merged
merged 1 commit into from Jul 30, 2019

Conversation

luispuig
Copy link
Contributor

The situation

None element is rendered when a render*Controls prop in null but when it is a function that returns null the control div wrapper is rendered empty:

image

Use case: Removing the previous/next controls when they are not needed returning null depending on currentSlide and slideCount renders the empty div wrapper causing pointer-events problems.

The proposal

This PR renders the div wrapper and the element (returned by the render*Controls prop) only when the render*Controls prop is a function and that function is not returning null/false.

@sarmeyer
Copy link
Member

Thank you for submitting this @luispuig!

@sarmeyer sarmeyer merged commit bb16d0a into FormidableLabs:master Jul 30, 2019
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

2 participants