hoaphantn7604 / react-native-element-dropdown

A react-native dropdown component easy to customize for both iOS and Android.
MIT License
947 stars 164 forks source link

Using dropdown with form elements causing the whole app to freeze #199

Open iarmankhan opened 1 year ago

iarmankhan commented 1 year ago

Hi, I have implemented the library in my project and when I use the dropdown alone, it works fine. But if I use the dropdown component with different form elements, it freezes the whole app. I have to kill the app and restart it to make it work again. This is always happening.

Bug: https://github.com/hoaphantn7604/react-native-element-dropdown/assets/40450695/5540db81-f3cb-4a60-a1b5-5759be939ade

There is no infinite loop in the code as I checked the console.

ace-builds commented 9 months ago

Hi @iarmankhan did you find a solution to this?

Sonamupta commented 6 months ago

Hi, I have implemented the library in my project and when I use the dropdown alone, it works fine. But if I use the dropdown component with different form elements, it freezes the whole app. I have to kill the app and restart it to make it work again. This is always happening.

Bug: https://github.com/hoaphantn7604/react-native-element-dropdown/assets/40450695/5540db81-f3cb-4a60-a1b5-5759be939ade

There is no infinite loop in the code as I checked the console.

you are using dropdown in the custom component it is freezing on data props because you are using like props.data but we have to use like this.

export default function CustomDropDownPicker({ data}: any) { <Dropdown style={[styles.dropdown, dropDownCont]} placeholderStyle={styles.placeholderStyle} data={data} }