-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Current behaviour
- Menu is being dismissed unexpectedly after the first instance despite visible = {true}
- As in my 5.13.1 video, the first input into my searchbox works but after a pause, subsequent inputs cause the behavior to be erratic
Expected behaviour
- Menu dropdown stays on when visible = {true}
- 5.12.5 video behavior is expected
- Code below has not been changed between the two versions
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
| software | version |
|---|---|
| ios | 18.2 |
| android | x |
| react-native | 0.76.7 |
| react-native-paper | 5.12.5 (working as expected) vs 5.13.1 (not working) |
| node | >=18 |
| npm or yarn | npm |
| expo sdk | x.x.x |