-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Menu is being hidden despite visibility being set to {true} #4631
Comments
@EmersonChow most likely it's related to the newArch support. Could you provide a reproducible example based on your code? It would speed things up |
@BogiKay import { useEffect, useState } from "react"; const ProfileTest: React.FC<{navigation: any}> = ({navigation}) => {
} function getMenuItems(data: string[]): React.JSX.Element{ export default ProfileTest the useEffect logs show that visibility isn't changing: Screen.Recording.2025-02-19.at.6.46.20.PM.mov |
Thanks! I'll investigate the issue |
Current behaviour
Expected behaviour
How to reproduce?
<Menu visible = {menuVisible} onDismiss={()=> setMenuVisible(false)} anchorPosition='bottom' style = {styles.menuStyle} contentStyle = {styles.menuContentStyle} children = {getAutocompleteSuggestionMenuItems((autoCompleteSuggestionsData != undefined && autoCompleteSuggestionsData.suggestions.length > 0) ? autoCompleteSuggestionsData.suggestions : [{placeId: '', text: 'No address suggestions found'}], setMenuVisible, getPlaceDetails, setAddressData)} anchor = { <TextInput label = {<Text>Street Address</Text>} value={addressData.streetAddress} onChangeText={async (newAddress:string) => { setAddressData(({ location, ...addressData }) => ({ ...addressData, streetAddress: newAddress })); if (addressData.streetAddress != ''){ const req: googleApiGetAddressRequest = { userText: newAddress, sessionToken: await getGoogleSessionToken() } getAddressAutofill(req) } if (menuVisible === true && newAddress === ''){ setMenuVisible(false); } else if (menuVisible === false){ setMenuVisible(true) } }} onSubmitEditing={()=>setMenuVisible(false)} autoComplete= 'address-line1' mode = 'outlined' multiline = {true} outlineColor= {outlineMissingInfo && !isValidStreetAddress(addressData.streetAddress)? 'red' : 'black'} ></TextInput> } ></Menu>
Preview
behavior on 5.12.5:
Screen.Recording.2025-02-14.at.3.24.07.PM.mov
behavior on latest 5.13.1
Screen.Recording.2025-02-14.at.3.30.05.PM.mov
What have you tried so far?
Downgrade react-native-paper from 5.13.1 to 5.12.5
Your Environment
The text was updated successfully, but these errors were encountered: