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

Allow React SwiperSlide children as long as displayName includes SwiperSlide #5954

Merged

Conversation

crtl
Copy link
Contributor

@crtl crtl commented Aug 11, 2022

Fixes #4413

Replaces strict displayName check with includes check to allow different displayNames for components that act as SwiperSlide as long as their displayName includes the phrase SwiperSlide.

Refactor getChildren to return all child components whose names contains SwiperSlide to allow for custom components in Swiper that do not have a displayName of SwiperSlide.
Adds helper function isChildSwiperSlide(child) to check if react child is a child which contains SwiperSlide in its displayName.
@crtl crtl changed the title Allow SwiperSlide children as long as displayName includes SwiperSlide Allow React SwiperSlide children as long as displayName includes SwiperSlide Aug 11, 2022
@nolimits4web nolimits4web merged commit d1f7582 into nolimits4web:master Aug 12, 2022
@nolimits4web
Copy link
Owner

merged, thanks!

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.

Children does not render properly (after wrapper component)
2 participants