react-native-element-dropdown icon indicating copy to clipboard operation
react-native-element-dropdown copied to clipboard

flickering when having multiple dropdown

Open Four58 opened this issue 9 months ago • 11 comments

here is the source code: https://github.com/Four58/dropdown

https://github.com/user-attachments/assets/379190e1-23b0-471d-a9e6-275a072075e1

I just copied the code example and try open every dropdown list. I realized that it usually flickering the previous one.

Four58 avatar Mar 17 '25 00:03 Four58

I have the same problem, but it only happens on IOS. Have you found a solution?

ZorianaBila avatar Mar 31 '25 19:03 ZorianaBila

I am experiencing this issue as well.

bvedad avatar Apr 05 '25 10:04 bvedad

same here

alemar11 avatar Apr 11 '25 13:04 alemar11

same on IOS

vkondratievtouchbistro avatar Apr 12 '25 22:04 vkondratievtouchbistro

Same here on iOS

Tomer-Ezon avatar Apr 18 '25 08:04 Tomer-Ezon

Have you find any fix or workaround for this issue?

ChechoCZ avatar Apr 22 '25 20:04 ChechoCZ

@Four58 Have you find any solution?

PaviPff avatar May 05 '25 10:05 PaviPff

same here

HamzaJameel01 avatar May 13 '25 16:05 HamzaJameel01

@HamzaJameel01 I managed to fix it by making the changes below in v2.12.4

diff --git a/node_modules/react-native-element-dropdown/src/components/Dropdown/index.tsx b/node_modules/react-native-element-dropdown/src/components/Dropdown/index.tsx
index 2a73f2f..cfb8149 100644
--- a/node_modules/react-native-element-dropdown/src/components/Dropdown/index.tsx
+++ b/node_modules/react-native-element-dropdown/src/components/Dropdown/index.tsx
@@ -638,7 +638,7 @@ const DropdownComponent = React.forwardRef<IDropdownRef, DropdownProps<any>>(
     );
 
     const _renderModal = useCallback(() => {
-      if (visible && position) {
+      if ( position) {
         const { isFull, width, height, top, bottom, left } = position;
 
         const onAutoPosition = () => {

PaviPff avatar May 14 '25 06:05 PaviPff

@HamzaJameel01 I managed to fix it by making the changes below in v2.12.4

diff --git a/node_modules/react-native-element-dropdown/src/components/Dropdown/index.tsx b/node_modules/react-native-element-dropdown/src/components/Dropdown/index.tsx
index 2a73f2f..cfb8149 100644
--- a/node_modules/react-native-element-dropdown/src/components/Dropdown/index.tsx
+++ b/node_modules/react-native-element-dropdown/src/components/Dropdown/index.tsx
@@ -638,7 +638,7 @@ const DropdownComponent = React.forwardRef<IDropdownRef, DropdownProps<any>>(
     );
 
     const _renderModal = useCallback(() => {
-      if (visible && position) {
+      if ( position) {
         const { isFull, width, height, top, bottom, left } = position;
 
         const onAutoPosition = () => {

I had another issue. I opened a separate modal, then opened and selected an item from the dropdown. The previous modal blinked. But your approach fixed my issue. Thank you

trilam1409 avatar May 21 '25 08:05 trilam1409

I tried removing itemContainerStyle, and it worked. I removed the border style and border width from itemContainerStyle, and that resolved the issue.

AsurNikul avatar Jul 30 '25 10:07 AsurNikul