question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Search bar is not responsive if the dropdown is on top

See original GitHub issue

TL;DR Here’s an image.

Bug description: The dropdown is below other views (they display on top of it). If I try to add an elevation to the dropdown style, the view looks good however the search doesn’t display the keyboard when pressed. zIndex has no effect (maybe I used it wrong).

Here’s the code: App.js:

return (
    <SafeAreaView>
      <MyDropView />
      <AdComponent />
      <OtherComponent />
    </SafeAreaView>
  );

MyDropView.js:

return (
    <View style={{flexDirection: 'row'}}>
      <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>
  );

Expected behavior The dropdown is displayed on top of all view and the search feature works.

Info:

  • OS: [Android]
  • Package version [28]

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hossein-zarecommented, Jul 7, 2020

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

0reactions
usersinacommented, Jul 6, 2020

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 ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to make responsive search bar and dropdown
Everything is working fine only problem is, Search bar and dropdown menu is not full width 100%.I want dropdown menu cover full width...
Read more >
How to Fix Search Bar Not Working in Windows 10 ... - YouTube
This video what to do when the search bar is not working properly in Windows 10. In some cases, you may not be...
Read more >
Build a Responsive Search Bar in 30 Minutes | HTML & CSS
Donate - https://www.mikedane.com/contribute/Twitter - https://twitter.com/mike_daneCode along with me as I build and style a beautiful and ...
Read more >
Responsive Dropdown Menu Bar with Search Field using ...
Hey friends, today in this blog you'll learn how to create a Responsive Dropdown Menu Bar with Search Field using only HTML &...
Read more >
Navbar - Bootstrap
Documentation and examples for Bootstrap's powerful, responsive navigation header, the navbar. Includes support for branding, navigation, and more, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found