This repository was archived by the owner on Jul 19, 2019. It is now read-only.
This repository was archived by the owner on Jul 19, 2019. It is now read-only.
the AutoComplete was poped out, I can't update the value, and it gives me an error. What a big mess! #379
Open
Description
I already use react-autocomplete and I found so much error (or maybe my fault).
First, the data was already called, and it shows. But when I scroll down, the Autocomplete just popped out like this picture:
Then, I can't type anything inside of it, and when I click one of them, it returns error like this:
Uncaught ReferenceError: value is not defined
This is the code that I write
<AutoComplete getItemValue={item => item.city_name} items={state.location}
renderItem={(item, isHighlighted) =>
<div key={item.id} style={{background: isHighlighted ? 'lightgray' : 'white', color: 'black', fontSize:'0.5em'}}>
{item.city_name}
</div>
} onChange={(e) => value = e.target.value} onSelect={(val) => value = val}
/>
Metadata
Metadata
Assignees
Labels
No labels