sickdyd / react-search-autocomplete

A search box that filters the provided array of objects
https://sickdyd.github.io/react-search-autocomplete
MIT License
220 stars 84 forks source link

Zindex error for this component #3

Closed RuddyReisberg closed 3 years ago

RuddyReisberg commented 4 years ago

Hello,

I want to see myCompnentReactSearchAutocomplete in my front but it is blocked by an other. Please, see the join.

Thanks you very much file2 file1

sickdyd commented 4 years ago

Hello RuddyReisberg,

apologies for the late reply. Could you provide an example on CodeSandBox or similar? https://codesandbox.io

The first thing I would try is to wrap the search boxes in a <div> with increasing z-index. Something like:

<div style={{ zIndex: 2 }}>
  <ReachSearchAutocomplete />
</div>

<div style={{ zIndex: 1 }}>
  <ReachSearchAutocomplete />
</div>

Let me know if this helps!

EDIT: I edited my reply since the indexes were inverted!

raikk commented 2 years ago

@sickdyd I have same issue here. Even I wrapped in div with zIndex 4, still can't. See this, please suggest where to make able to modify styling of this module??

Screenshot 2022-05-03 at 9 32 35 PM
raikk commented 2 years ago

Ohh... got it. We have to use styling

<ReactSearchAutocomplete
   styling={{backgroundColor: '#fff', 
zIndex: 2, 
placeholder: 'Type Country',
 placeholderColor: "#939294", 
borderRadius: "2px", 
height: "35px"}}   
...
/>

Thanks @sickdyd for this great module.