Coder Social home page Coder Social logo

onmotion / react-native-autocomplete-dropdown Goto Github PK

View Code? Open in Web Editor NEW
184.0 5.0 73.0 5.72 MB

Dropdown Item picker with search and autocomplete (typeahead) functionality for react native

License: MIT License

JavaScript 4.65% Objective-C 3.17% Ruby 3.01% Objective-C++ 1.12% TypeScript 84.47% Kotlin 3.58%
react-native android ios dropdown dropdown-menu typeahead select autocomplete autocomplete-suggestions hacktoberfest

react-native-autocomplete-dropdown's Introduction

react-native-autocomplete-dropdown

Dropdown Item picker with search and autocomplete (typeahead) functionality for react native

license npm npm

This is documentation for version 4.x, if you are looking docs for version 3.x, you can find it here

Demo

Run expo snack demo @onmotion/react-native-autocomplete-dropdown

Nav

Installation

Run:

or

yarn add react-native-autocomplete-dropdown

or for v3.x

Post-install Steps

Make sure react-native-svg is installed. Follow the guide https://github.com/software-mansion/react-native-svg

yarn add react-native-svg

iOS

Run: npx pod-install for install react-native-svg dependency (if not installed yet).

Android

No additional steps are necessary

Usage

Wrap your root component in AutocompleteDropdownContextProvider from react-native-autocomplete-dropdown as you can see in example

<AutocompleteDropdownContextProvider>
    <AppRootOrWhatever/>
</AutocompleteDropdownContextProvider>

If you have a header component, you can pass an offset. For example with react navigation

//...
import { useHeaderHeight } from '@react-navigation/elements';
//...
const headerHeight = useHeaderHeight();
//...

<AutocompleteDropdownContextProvider headerOffset={headerHeight} >
    <AppRootOrWhatever/>
</AutocompleteDropdownContextProvider>

import the package

import { AutocompleteDropdown } from 'react-native-autocomplete-dropdown';

Dataset item format

dataSet property must be an array of objects or null. Object required keys are:

{
    id: 'some uniq string id',
    title: 'list item title'
}

Example with local Dataset

const [selectedItem, setSelectedItem] = useState(null);

<AutocompleteDropdown
  clearOnFocus={false}
  closeOnBlur={true}
  closeOnSubmit={false}
  initialValue={{ id: '2' }} // or just '2'
  onSelectItem={setSelectedItem}
  dataSet={[
    { id: '1', title: 'Alpha' },
    { id: '2', title: 'Beta' },
    { id: '3', title: 'Gamma' },
  ]}
/>;

Example with remote requested Dataset

import React, { memo, useCallback, useRef, useState } from 'react'
import { Button, Dimensions, Text, View, Platform } from 'react-native'
import { AutocompleteDropdown } from 'react-native-autocomplete-dropdown'

export const RemoteDataSetExample2 = memo(() => {
  const [loading, setLoading] = useState(false)
  const [suggestionsList, setSuggestionsList] = useState(null)
  const [selectedItem, setSelectedItem] = useState(null)
  const dropdownController = useRef(null)

  const searchRef = useRef(null)

  const getSuggestions = useCallback(async q => {
    const filterToken = q.toLowerCase()
    console.log('getSuggestions', q)
    if (typeof q !== 'string' || q.length < 3) {
      setSuggestionsList(null)
      return
    }
    setLoading(true)
    const response = await fetch('https://jsonplaceholder.typicode.com/posts')
    const items = await response.json()
    const suggestions = items
      .filter(item => item.title.toLowerCase().includes(filterToken))
      .map(item => ({
        id: item.id,
        title: item.title,
      }))
    setSuggestionsList(suggestions)
    setLoading(false)
  }, [])

  const onClearPress = useCallback(() => {
    setSuggestionsList(null)
  }, [])

  const onOpenSuggestionsList = useCallback(isOpened => {}, [])

  return (
    <>
      <View
        style={[
          { flex: 1, flexDirection: 'row', alignItems: 'center' },
          Platform.select({ ios: { zIndex: 1 } }),
        ]}>
        <AutocompleteDropdown
          ref={searchRef}
          controller={controller => {
            dropdownController.current = controller
          }}
          // initialValue={'1'}
          direction={Platform.select({ ios: 'down' })}
          dataSet={suggestionsList}
          onChangeText={getSuggestions}
          onSelectItem={item => {
            item && setSelectedItem(item.id)
          }}
          debounce={600}
          suggestionsListMaxHeight={Dimensions.get('window').height * 0.4}
          onClear={onClearPress}
          //  onSubmit={(e) => onSubmitSearch(e.nativeEvent.text)}
          onOpenSuggestionsList={onOpenSuggestionsList}
          loading={loading}
          useFilter={false} // set false to prevent rerender twice
          textInputProps={{
            placeholder: 'Type 3+ letters (dolo...)',
            autoCorrect: false,
            autoCapitalize: 'none',
            style: {
              borderRadius: 25,
              backgroundColor: '#383b42',
              color: '#fff',
              paddingLeft: 18,
            },
          }}
          rightButtonsContainerStyle={{
            right: 8,
            height: 30,

            alignSelf: 'center',
          }}
          inputContainerStyle={{
            backgroundColor: '#383b42',
            borderRadius: 25,
          }}
          suggestionsListContainerStyle={{
            backgroundColor: '#383b42',
          }}
          containerStyle={{ flexGrow: 1, flexShrink: 1 }}
          renderItem={(item, text) => <Text style={{ color: '#fff', padding: 15 }}>{item.title}</Text>}
        //   ChevronIconComponent={<Feather name="chevron-down" size={20} color="#fff" />}
        //   ClearIconComponent={<Feather name="x-circle" size={18} color="#fff" />}
          inputHeight={50}
          showChevron={false}
          closeOnBlur={false}
          //  showClear={false}
        />
        <View style={{ width: 10 }} />
        <Button style={{ flexGrow: 0 }} title="Toggle" onPress={() => dropdownController.current.toggle()} />
      </View>
      <Text style={{ color: '#668', fontSize: 13 }}>Selected item id: {JSON.stringify(selectedItem)}</Text>
    </>
  )
})

More examples see at https://github.com/onmotion/react-native-autocomplete-dropdown/tree/main/example

Playground

To play around with the examples, you can run the following commands

cd example
yarn install
yarn pods

yarn ios
yarn android

Options

Option Description Type Default
dataSet set of list items array null
initialValue string (id) or object that contain id string | object null
loading loading state bool false
useFilter whether use local filter by dataSet (useful set to false for remote filtering to prevent rerender twice) bool true
showClear show clear button bool true
showChevron show chevron (open/close) button bool true
closeOnBlur whether to close dropdown on blur bool false
closeOnSubmit whether to close dropdown on submit bool false
clearOnFocus whether to clear typed text on focus bool true
caseSensitive whether to perform case-sensitive search bool false
ignoreAccents ignore diacritics bool true
trimSearchText trim the searched text bool true
editable is textInput editable bool true
debounce wait ms before call onChangeText number 0
suggestionsListMaxHeight max height of dropdown number 200
direction "up" or "down" string down + auto calculate
matchFrom whether match suggestions from start of titles or anywhere in the title. Possible values are "any" or "start" string any
bottomOffset for calculate dropdown direction (e.g. tabbar) number 0
onChangeText event textInput onChangeText function
onSelectItem event onSelectItem function
onOpenSuggestionsList event onOpenSuggestionsList function
onChevronPress event onChevronPress function
onClear event on clear button press function
onSubmit event on submit KB button press function
onBlur event fired on text input blur function
onFocus event on focus text input function
renderItem JSX for render item (item, searchText) => JSX | null if return null then the element will not be displayed function item.title
controller return reference to module controller with methods close, open, toggle, clear, setInputText, setItem function
containerStyle ViewStyle
rightButtonsContainerStyle ViewStyle
suggestionsListContainerStyle ViewStyle
suggestionsListTextStyle TextStyle styles of suggestions list text items
ChevronIconComponent React.Component Feather chevron icon
ClearIconComponent React.Component Feather x icon
ScrollViewComponent removed in 2.0.0 based on FlatList React.Component name ScrollView that provide suggestions content
EmptyResultComponent replace the default `` Component on empty result React.Component
InputComponent input element component React.ComponentType TextInput
emptyResultText replace the default "Nothing found" text on empty result string "Nothing found"
textInputProps text input props TextInputProps
flatListProps props for \ component FlatListProps\

Contribution

react-native-autocomplete-dropdown's People

Contributors

abpbackup avatar brion-bitzen avatar captainhaider avatar davichostar avatar drastus avatar dravec avatar gabriel1lima avatar joshsj89 avatar lucassaid avatar marcelinaziolkiewicz avatar mmomtchev avatar nholik avatar onmotion avatar paitoanderson avatar soleh45 avatar spmorr01 avatar thibaultcapelli avatar viacovne avatar villar74 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-native-autocomplete-dropdown's Issues

Add missing TS types

There are still some missing types in index.d.ts that cause TypeScript errors:

  1. renderItem function can return undefined – it's useful for filtering options
  2. ItemSeparatorComponent is completely missing, it can be passed as a prop to change options separator or (when false) to remove it completely.

closeOnBlur causing issues in Web version

I'm not really sure if you're supporting this for web, but I've had pretty good luck with it the only issue seems to be when I set closeOnBlur to true, the actual value never gets set when you select it from the dropdown. Weirdly it does work if you select it by clicking on the chevron to initiate the dropdown.

Help -> Avoid 2 press actions to select item from dropdown

Hi, as i see at the moment, we need to press twice to select item and close the dropdown. I guess this happens because we are focused in the input. Is there a way to avoid this, and select the item and close dropdown from 1 press?

Section List Implmentation

i have a data list like this ```
"data": {
"hotels": [
{
"id": "happiness_guesthouse",
"name": "Happiness Guesthouse",
"region_id": 6056164
},
{
"id": "478_msl_pak_chong",
"name": "478 MSL. Pak Chong",
"region_id": 6056164
},
{
"id": "the_pino_hotel_pakchong",
"name": "The Pino Hotel Pak-Chong",
"region_id": 6056164
},
{
"id": "baanthai_norway_pak_chong",
"name": "BaanThai Norway Pak Chong",
"region_id": 6056164
},
{
"id": "rachamanee_resort",
"name": "Rachamanee Resort",
"region_id": 6056164
}
],
"regions": [
{
"id": 6056164,
"name": "Pak Chong",
"type": "City",
"country_code": "TH"
},
{
"id": 6159488,
"name": "Le Paquier",
"type": "City",
"country_code": "CH"
},
{
"id": 6304681,
"name": "Pak Khlong",
"type": "City",
"country_code": "TH"
},
{
"id": 6307227,
"name": "Pak Tako",
"type": "City",
"country_code": "TH"
}
]
}



the best solution for this is section list. i have try but there were multiple. 

any solution for this

ERROR VirtualizedLists should never be nested inside plain ScrollViews with the same orientation because it can break windowing and other functionality - use another VirtualizedList-backed container instead.

While focus the input it triggers the below error.

ERROR VirtualizedLists should never be nested inside plain ScrollViews with the same orientation because it can break windowing and other functionality - use another VirtualizedList-backed container instead.

Here is my code.
<KeyboardAwareScrollView keyboardShouldPersistTaps='always' enableOnAndroid={true} contentContainerStyle={{ flexGrow: 1 }}>
<AutoCompleteInput
name='cityId'
dataSet={cities}
placeholder='City'
disabled={!(isCityDisable || cities.length <= 0)}
titleKey='cityName'
titleId='cityId'
closeOnBlur={true}
emptyResultText='No city found'
/>

Bug: Unable to select Dropdown items on Android

I'm getting an issue on Android where while the dropdown appears, I can't interact with the dropdown selections at all. It seems to occur whenever I wrap the control in a <View> and apply any styling to that view.

Here is a snack to demonstrate the issue https://snack.expo.dev/@ipwright83/react-native-autocomplete-dropdown. Running on Android you're unable to interact with the dropdown (unless you comment out borderColor and borderWidth) on lines 53-54.

This only seems to affect Android, it works correctly on iOS.

Here's some code to reproduce:

import React, { Node, useState } from 'react';
import {
  Platform,
  SafeAreaView,
  ScrollView,
  StyleSheet,
  Text,
  useColorScheme,
  View,
} from 'react-native';
import { Colors } from 'react-native/Libraries/NewAppScreen';
import { AutocompleteDropdown } from 'react-native-autocomplete-dropdown';

const App: () => Node = () => {
  const styles = getStyles();
  const [selectedItem, setSelectedItem] = useState(null);

  return (
    <React.Fragment>
      <View style={styles.spacer} />
      <View style={styles.container}>
        <AutocompleteDropdown
          clearOnFocus={false}
          closeOnBlur={true}
          initialValue={{ id: '2' }} // or just '2'
          dataSet={[
            { id: '1', title: 'Alpha' },
            { id: '2', title: 'Beta' },
            { id: '3', title: 'Gamma' },
          ]}
        />
        <Text style={{ color: '#668', fontSize: 13 }}>
          Selected item: {JSON.stringify(selectedItem)}
        </Text>
      </View>
    </React.Fragment>
  );
};

const getStyles = () => ({
  spacer: {
    height: 50,
  },
  container: {
    borderColor: "red",
    borderWidth: 1,
  }
});

export default App;

How to setup the value?

I'm not talking about initial value, I'm talking about how to manually set the value in the search bar? Like how can I change the text in the search bar based on the state, but not onSelect or onChangeText?

Suggestion List not scrolling.

Hello,

I implemented the following code, but my suggestion list is not scrolling. What could be wrong?

<AutocompleteDropdown
debounce={600}
emptyResultText={'Nenhum item encontrado.'}
clearOnFocus={true}
closeOnBlur={true}
closeOnSubmit={false}
useFilter={false}
showChevron={false}
loading={loading}
dataSet={clientesList}
onChangeText={handleOnChangeText}
onClear={handleOnClearPress}
onSelectItem={item => {
item && setSelectedItem(item.id);
}}
renderItem={(item, text) => (
<Text style={{padding: 15}}>{item.title}
)}
inputHeight={45}
suggestionsListMaxHeight={Dimensions.get('window').height * 0.4}
textInputProps={{
placeholder: 'Digite 3 caracteres ou mais...',
autoCorrect: false,
autoCapitalize: 'none',
style: {
borderRadius: 15,
backgroundColor: theme.gray[100],
color: theme.gray[500],
paddingLeft: 10,
},
}}
inputContainerStyle={{
backgroundColor: theme.gray[100],
borderRadius: 15,
}}
/>

Any way to use a render a custom Text Input

Been looking for a react native autocomplete library and they all seem to have issues with certain conditions and functionality that I need. However react-native-autocomplete-dropdown seems to work really nicely and tick all the boxes...except that I am trying to align the look of the input with Text Input from react-native-paper.

With other dropdown/autocomplete libraries, there is usually the option to have a custom component for rendering the input, but this doesn't seem to be possible with this library? Any way to do this, or do I need to manually work up the styles as best I can to match? The issue with styling approach is it is quite difficult to match everything up, especially the floating labels/placeholder that you get with paper.

Unable to use storybook with this component

We are using Storybook in our project to document the components we created for the app. After we installed this library storybook stopped working in the app.

Below is our App.tsx file, for some reason the fonts are never loaded and it stays forever on the AppLoading component. Both true and false values for renderDoc end up loading forever.

import React from 'react';

import { useFonts } from 'expo-font';
import { Inter_400Regular, Inter_600SemiBold } from '@expo-google-fonts/inter';

import AppLoading from 'expo-app-loading';
import { ThemeProvider } from 'styled-components';
import { appTheme } from './src/styles/theme';

import { StatusBar } from './src/components';
import { Routes } from './src/routes';
import Storybook from './storybook';

const renderDoc = false;

const App = () => {
  const [fontsLoaded] = useFonts({
    Inter_400Regular,
    Inter_600SemiBold,
  });

  if (!fontsLoaded) {
    return <AppLoading />;
  }

  return (
    <ThemeProvider theme={appTheme}>
      {renderDoc ? (
        <Storybook />
      ) : (
        <>
          <StatusBar />
          <Routes />
        </>
      )}
    </ThemeProvider>
  );
};

export default App;

If we change it to this code below then it works to at least run the app.

return (
    <ThemeProvider theme={appTheme}>
          <StatusBar />
          <Routes />
    </ThemeProvider>
  );

If we keep the Storybook code and remove the loading verification then storybook runs but none of the components work because of an error with font loading.

Simulator Screen Shot - iPhone 11 - 2021-09-02 at 21 53 39

How to Change the color of the placeholder text??

Hello everyone is there any way to change the color of the placeholder?

Code:

<AutocompleteDropdown
        clearOnFocus={false}
        closeOnBlur={false}
        closeOnSubmit={false}
        showClear={false}
        initialValue={{ id: '1' }} 
        inputContainerStyle={styles.inputContainerStyle}
        textInputProps={{
          placeholder: 'select item',
          style: {
            fontSize: 20,
          },
        }}
        suggestionsListMaxHeight={Dimensions.get('window').height * 0.5}
        dataSet={dataSet}
      />

SuggestionList inside a Modal is transparent and could not be selected in iOS

I am facing an issue similar to the one mentioned in the /issues/16 in my iOS. This works as expected in Android.

The difference to the above mentioned issue is, here the dropdown is present inside a KeyboardAwareScrollView which is inturn present inside a Modal. I have tried React.Fragment for parent View and tried zIndex as well. But nothing seems to be helping. Or may be im applying it wrong. Please let me know if any further details needed to explain the issue.

Screenshot 2022-05-13 at 10 05 54 PM

Nested scrollView

I'm facing some issues when using this component inside a parent scrollView. Basically I can't scroll and also the keyboardAvoidView doesn't work too.

Not able to remove the border line in dropdown items

Hello everyone I need to remove border line of the dropdown items.
Even try using the renderItem to create new list items of drop down. But I can't find any way to remove the dropdown list border.

Please see the example below:

Screen Shot 2022-10-11 at 13 09 06

Code:

import React, { useState } from 'react';
import { AutocompleteDropdown } from 'react-native-autocomplete-dropdown';
import Icon from 'react-native-vector-icons/MaterialIcons';
import { styles } from './styles/autocomplete.styles';
import { Text } from 'native-base';
import { Dimensions, Platform } from 'react-native';

export function AlAutoComplete() {
const [selectedItem, setSelectedItem] = useState();
const dataset = [
{ id: '1', title: 'Alpha' },
{ id: '2', title: 'Beta' },
{ id: '3', title: 'Gamma' },
{ id: '4', title: 'Gamma' },
{ id: '5', title: 'Gamma' },
{ id: '6', title: 'Alpha' },
{ id: '7', title: 'Alpha' },
{ id: '8', title: 'Alpha' },
{ id: '9', title: 'Alpha' },
{ id: '10', title: 'Gamma' },
{ id: '11', title: 'Gamma' },
{ id: '12', title: 'Gamma' },
{ id: '13', title: 'Gamma' },
{ id: '14', title: 'Gamma' },
{ id: '15', title: 'Gamma' },
];

return (
<AutocompleteDropdown
clearOnFocus={false}
closeOnBlur={false}
closeOnSubmit={false}
showClear={false}
initialValue={{ id: '1' }}
onSelectItem={setSelectedItem}
inputContainerStyle={styles.inputContainerStyle}
suggestionsListMaxHeight={Dimensions.get('window').height * 0.5}
dataSet={dataset}
/>
);
}

export default AutoComplete;

Clear the textInput Programatically

First of All Thank you for the wonderful library. I would like to clear the input programatically instead of clear button. can u please suggest me something to implement like this.

onChangeItem

Is there no #onchangeitem option in َAutocompleteDropdown?
Help if you can
Thanks

Don't show suggestionList until some text is written

How can I hide the suggestionList if the input text length is < than 3 for example.

I already try using onFocus prop with the useRef like this

const handleOnFocus = () => {
    dropdownController.current?.close();
 };

but it didn't work

Prevent open on focus

Is there a way to prevent the dropdown from opening onFocus? I need it to only open when the user enters a search term.

Feature Request: onClose closure

Hi! Thank you so much for creating this package, I am really enjoying it and it works really well.

I thought it would be nice to have a onClose/onBlur prop that receives a function that runs whenever the focus goes to another component, or when the user is done with the input.

zIndex not set correclty

Hi, in your web example, the dropdown is hidden behind other components that are below it in the DOM hirarchy. Are you aware of this issue ?

image

Sometimes list items appear blank

I've implemented a simple autocomplete box driven by a local dataset. I memoize the list without dependencies, and the behavior of the search results seems inconsistent. In the video I've attached, you can see me trying to search for Artist, which appears sometimes and not others, but I've confirmed that the blank row is still connected to the right list item (i.e., when I click on it, it does respond as I expect).

I can't figure out what makes it show or not, since you can see in the video that I do ultimately make it appear by just typing and backspacing a few times, selecting other items, etc. It doesn't appear to be related to which item is currently selected.

Screen.Recording.2021-08-24.at.6.45.45.PM.mov

I'm a fan of how good the default styling is out of the box, so I'd love to make this work. Do you have any ideas?

I don't currently have time to make a fully reproducible demo, but the component is quiet simple:

import React, { useState, useContext, useMemo } from 'react';
import { View } from 'react-native';
import { AutocompleteDropdown } from 'react-native-autocomplete-dropdown'

import DecksContext from 'CONTEXTS/decks';
import Card from './Card';

export default function CardFinder() {
  const { ownedCards } = useContext(DecksContext);

  const cardsList = useMemo(() => {
    return ownedCards.map(card => ({ id: card.card_id, title: card.title }));
  }, []);

  const [ cardId, setCardId ] = useState(null);

  return (
    <View>
      <AutocompleteDropdown
        onSelectItem={({ id }) => setCardId(id)}
        dataSet={cardsList}
      />
      {cardId ? (
        <Card id={cardId} />
      ) : null}
    </View>
  );
}

Version info:

"expo": "~42.0.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
"react-native-autocomplete-dropdown": "^1.1.4",

There is Error When open the Dropdown

ERROR VirtualizedLists should never be nested inside plain ScrollViews with the same orientation because it can break windowing and other functionality - use another VirtualizedList-backed container instead.

Issue wrapping with scrollview

I tried to wrap the autocomplete to scrollview but i got this error.

VirtualizedLists should never be nested inside plain ScrollViews with the same orientation because it can break windowing and other functionality - use another VirtualizedList-backed container instead

Showing Multiple Drop Down

Hi,
First Thanks for this Amazing Package works great

But May i know how can i show 2 DropDown

My Code

<View style={{flex:1}}>
      <DropDown />
       <DropDown />
</View>

Suggestion Text Not Visibile

For some reason, the suggestion text is not visible. Here is the code:

<AutocompleteDropdown
                initialValue={{ id: '2' }} // or just '2'
                
                inputContainerStyle={{
                  backgroundColor: 'transparent',
                  marginLeft: 3,
                  maxWidth: 166,
                  height: 20,
                  marginTop: -15,
                  zIndex: 10,
                }}
                suggestionsListContainerStyle={{
                  
                  marginTop: -30,
                  marginLeft: 10,
                  width: 231,
                  height: 135,
                  zIndex: 20,
                }}
                clearOnFocus={false}
                closeOnBlur={true}
                textInputProps={{
                  placeholder: 'Enter Exercise',
                  style: {
                    color: 'white',
                    fontWeight: 'bold',
                  },
                  placeholderTextColor: 'white',
                }} // or just '2'
                ItemSeparatorComponent={<View style={{ height: 0 }} />}

                suggestionsListTextStyle={{ color: 'black' }}
                suggestionsListMaxHeight={135}
                onOpenSuggestionsList={() => {
                  suggestionOpened();
                }}
                onSelectItem={item => {
                  item && changePic(item.pic);
                  setSearching(false);
                }}
                onChangeText={item => {
                  item && getData(item);
                }}
                showClear={false}
                dataSet={dataSet}
              />

Screenshot:

image

Using renderItem cannot autocomplete strings

When not using renderItem, It can autocomplete text strings. But on using renderItem, component cannot autocomplete strings.

In example RemoteDataExample (not using renderItem)
image

In example RemoteDataExample3 (using renderItem), you can see the difference between dropbox.
image

Very nice autocomplete-dropdown library! please fix this issue....

Unable to scroll on Android

Hi, I found this addon a few days ago and I've been using it in my project, but for some reason the suggestions list is not scrollable for me when using android (works fine for ios though). I've tried a lot of things that have worked for others but so far none of them has worked for me. Is there a fix for this? Thanks in advance.

textInputProps shows as invalid prop in ESLint

When using typescript, the linter, or whatever checks the intrinsic props, shows an error saying that the textInputProps is an invalid prop, however if I run the react native app, it works!

Screen Shot 2021-06-18 at 3 45 11 PM

Loading Indicator doesn't animate

I've found that when I set the loading prop to true the loading spinner appears, but it doesn't animate - it doesn't really convey the same message that it's loading when it's stationary.

Bug

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.