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: dont warn about header if prop not changed #965

Merged
merged 1 commit into from
Jun 8, 2021

Conversation

WoLewicki
Copy link
Member

Description

Added changes from https://github.com/react-navigation/react-navigation/blob/main/packages/native-stack/src/views/NativeStackView.tsx#L28 to display warning about header in modal only after the prop has been changed, so it will not display the warning if the user specified headerShown: true in the options for the screen.

Test code and steps to reproduce

Test800.tsx in TestsExample project.

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

Copy link
Member

@kacperkapusciak kacperkapusciak left a comment

Choose a reason for hiding this comment

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

LGTM

@WoLewicki WoLewicki merged commit ba595f1 into master Jun 8, 2021
@WoLewicki WoLewicki deleted the @wolewicki/add-warn-once-header branch June 8, 2021 09:18
@robinvw1
Copy link

Thanks @WoLewicki! I got this old warning Be aware that changing the visibility of header in modal on iOS will result in resetting the state of the screen. every time, without changing the headerShown prop. Hopefully this will land soon in the new release. :)

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