Skip to content

Fix/tab page nested in scroll view #3224

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

Merged
merged 4 commits into from
Aug 22, 2024

Conversation

gayablau
Copy link
Contributor

@gayablau gayablau commented Aug 21, 2024

Description

added style prop to TabPage component to support TabConroller in ScrollView

Changelog

added style prop to TabPage component to support TabConroller in ScrollView

Additional info

@gayablau gayablau requested a review from ethanshar August 22, 2024 07:06
@gayablau gayablau marked this pull request as ready for review August 22, 2024 07:06
/**
* add style properties to tab page
*/
tabPageStyle?: StyleProp<ViewStyle>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

We usually ride the style prop name and don't create a different, since this is the main style that is passed to the root View in TabPage. Let's rename to style

!asCarousel && styles.page,
animatedPageStyle,
{width: asCarousel ? containerWidth : undefined},
tabPageStyle && tabPageStyle
Copy link
Collaborator

Choose a reason for hiding this comment

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

You don't need to condition it, if the style is undefined it will be meaningless and do nothing

@gayablau gayablau requested a review from ethanshar August 22, 2024 08:24
@ethanshar ethanshar self-assigned this Aug 22, 2024
@ethanshar ethanshar merged commit 4b6d8f3 into master Aug 22, 2024
1 check passed
@ethanshar ethanshar deleted the fix/tab-page-nested-in-scroll-view branch August 22, 2024 12:08
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.

2 participants