Im using react-native-paper which is a great library, but i ran into a problem when i needed a dropdown menu, that is overlay on the TextInput field around it.
Don't want to use any Library unless it it maintained properly.
return (
<View style={{ top: StatusBar.currentHeight }}>
<View
style={{
flexDirection: 'row',
justifyContent: 'space-around',
marginVertical: 10,
}}>
<TextInput
label={'Title'}
placeholder={'Mr'}
value={userinput}
style={{ width: '30%' }}
onChangeText={(text) => setUserinput(text)}
right={<TextInput.Icon icon="chevron-down" size={20} />}
/>
<TextInput label={'First name'} style={{ width: '60%' }} />
</View>
<View style={{ alignSelf: 'center', width: '95%' }}>
<TextInput
label={'Phone number'}
onChangeText={(text) => setUserinput(text)}
/>
</View>
</View>
);
Bare minimum Expo Snack code.
Already tried
Although
react-native-paperprovidesList&List.Accordionbut my problem is not solving by that. issue When list is open the other text bot field are also extending there height.Mapping function, Flatlist, issue not getting the results that i want.
Position: Absoluteissue Mapping is not working accordingly.


I did it using
flatlistwithzIndexproperties, check my example codeExample:
Note:
marginTopwill be the same as inputheightand you can also move the flatlist to components