Open kruz123 opened 4 years ago
try to rewrite class to use fetchData prop instead of data prop.
Same issue here..
try to rewrite class to use fetchData prop instead of data prop.
is is possible to use with data? i would like to fetch the data only once
try:
{data && ( <Autocomplete data={data} />)}
TypeScript throws a warning that prop data does not exist on Autocomplete type.
Property 'data' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Autocomplete> & Readonly<AutocompleteProps> & Readonly<...>'.
Hi,
I have the same problem.
I load the <Autocomplete data={data} />
when {data} is ready but does't works
{data.length > 0 ? ( <Autocomplete data={data} />) : (console.log('not data')) }
Sorry, I have solved....The problem is equired props that I have omissed.
With
<Autocomplete data={data} valueExtractor={item => item.descr} />
works fine.
hello, i am implement this library in my project and call my project api and get the data and set data in state and update the state but the problem is that when i give the data in the autocomplete in data attribute and when run the project then that time autocomplete not suggest the drop down. and not show the result but when i use the static array and after i apply then that time complete work. so please give me solutions.
here is my code----------------
import React, { Component } from 'react'; import { View, StyleSheet, SafeAreaView, AsyncStorage } from 'react-native'; import { Autocomplete, withKeyboardAwareScrollView } from "react-native-dropdown-autocomplete";
class demoDropDown extends Component {
}
export default withKeyboardAwareScrollView(demoDropDown);
const styles = StyleSheet.create({ autocompletesContainer: { paddingTop: 0, zIndex: 1, width: "100%", paddingHorizontal: 8, }, input: { maxHeight: 40 }, inputContainer: { display: "flex", flexShrink: 0, flexGrow: 0, flexDirection: "row", flexWrap: "wrap", alignItems: "center", // borderBottomWidth: 1, // borderColor: "#c7c6c1", paddingVertical: 13, paddingLeft: 12, paddingRight: "5%", width: "100%", justifyContent: "flex-start", }, container: { flex: 1, backgroundColor: "#ffffff", }, plus: { position: "absolute", left: 15, top: 10, }, });