Giter Site home page Giter Site logo

Comments (9)

hossein-zare avatar hossein-zare commented on August 17, 2024 1

No, Try to get rid of the warning by fixing the issue.
I believe it's a zIndex conflict or nested views problem.

from react-native-dropdown-picker.

hossein-zare avatar hossein-zare commented on August 17, 2024

Hello,
Does it happen without elevation?

Try this:

import { Platform } from 'react-native';
 
<View style={{
    flexDirection: 'row',

    ...(Platform.OS !== 'android' && {
        zIndex: 10
     })

}}>
      <DropDownPicker
          searchable={true}
          searchablePlaceholder="Search..."
          searchableError={() => 'Not found'}
          ...
          containerStyle={{height: 40, width: '100%'}}
          dropDownStyle={{ elevation: 1 }} // The dropdown is on top, but search in unresponsive
      />
</View>

from react-native-dropdown-picker.

usersina avatar usersina commented on August 17, 2024

Without elevation, the dropdown is behind everything else in the view.
With elevation, the dropdown is on top of everything else but the click detection is still behind everything else.
If it's not clear, I'll try to demonstrate it using a gif

from react-native-dropdown-picker.

hossein-zare avatar hossein-zare commented on August 17, 2024

Try the suggested code without elevation

from react-native-dropdown-picker.

usersina avatar usersina commented on August 17, 2024

Already did, here are the current results:
With the suggested code: without_elevation
With elevation (with or without zIndex): with_elevation
Clickable area: Image
Clickable area: Gif

Here's a stackoverflow link with better explanation.

from react-native-dropdown-picker.

hossein-zare avatar hossein-zare commented on August 17, 2024

I created a snack which is working fine.
https://snack.expo.io/@hossein-zare/d38de5

You can edit the code and reproduce the unexpected behavior then send your snack to me.

from react-native-dropdown-picker.

usersina avatar usersina commented on August 17, 2024

Couldn't replicate the error.
However -oddly enough- when I toggle the inspector on and off, the dropdown behaves normally

from react-native-dropdown-picker.

hossein-zare avatar hossein-zare commented on August 17, 2024

Unfortunately i can't help you without having an exact and static behavior.
The elevation property is not a solution and must be avoided.
Check the other components if they have any zIndex.

from react-native-dropdown-picker.

usersina avatar usersina commented on August 17, 2024

I've wrapped the dropdown picker and the below components under a ScrollView and it's working. However I'm getting the following VirtualizedLists warning. Should I simply ignore it ?

Anyway, the issue shouldn't even happen on android from what I've seen. Do you have an idea to what might be causing it ?

from react-native-dropdown-picker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.