-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Adding freezeOnBlur for android and iOS #113
Adding freezeOnBlur for android and iOS #113
Conversation
Hey @okwasniewski, I've implemented the Meanwhile, feel free to review the PR when you have a chance. Thanks! |
src/TabView.tsx
Outdated
<MaybeScreenContainer | ||
enabled={detachInactiveScreens} | ||
hasTwoStates | ||
style={styles.container} | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested it on both new and old architecture? I feel like this might break passing children on new arch as technically now we have only one child.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Till now I tested this on Android for both new and old arch.
I will be testing it on iOS today.
@okwasniewski Fixed the iOS crash and tested it on Old and New arch for both platforms. Seems to be working fine now with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this!
if (Platform.OS === 'android' && Screens?.screensEnabled()) { | ||
return ( | ||
<Screens.ScreenContainer enabled={enabled} {...rest}> | ||
{children} | ||
</Screens.ScreenContainer> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we don't have the navigation container on iOS (JS Tabs have it) but it works without it?
That's weird 😅
If the ScreenContainer
is required then adding this might not be possible. As we need to have multiple children here
@tboba Could you help here? 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@okwasniewski Yeah on iOS it works even without Screen Container.
In case of Android we need ScreenContainer
and I just checked that It worked even with hasTwoStates={false}
on both platforms with New and Old Arch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, @shubhamguptadream11 after consulting with react-native-screens
team (thanks @kkafar, @tboba) it looks like detachInactiveScreens
won't work without the ScreenContainer
.
Can you change the PR to only add freezeOnBlur
?
Hey, sorry for the delay on review of this PR, I'm trying to get in touch with someone from |
Any updates on this PR? :) |
Hi @Nodonisko |
|
Merged in #207 thanks @shubhamguptadream11 |
Solves this: #71
Adding freezeOnBlur property.