react-native-autocomplete-dropdown icon indicating copy to clipboard operation
react-native-autocomplete-dropdown copied to clipboard

Component from the example isn't scrollable on Android

Open mirco123 opened this issue 1 year ago • 14 comments

The following code works fine under iOS, it also displays correctly on Android but the suggestion list is not scrollable. Btw. this is the example from the official documentation only enhanced by more data and it is not working as expected. Can anyone help?

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

return (<View >

        <AutocompleteDropdown
            clearOnFocus={false}
            closeOnBlur={true}
            closeOnSubmit={false}
            initialValue={{ id: '2' }} // or just '2'
            onSelectItem={( item ) => item && setSelectedItem( item.id )}
            dataSet={[
                { id: '1', title: 'Alpha' },
                { id: '2', title: 'Beta' },
                { id: '3', title: 'Gamma' },
                { id: '4', title: 'Delta' },
                { id: '5', title: 'Epsilon' },
                { id: '6', title: 'Zeta' },
                { id: '7', title: 'Eta' },
            ]}
        />
</View>);`

mirco123 avatar May 08 '23 22:05 mirco123

I've same issue

longtm101898 avatar May 09 '23 10:05 longtm101898

Same issue here

salokod avatar May 10 '23 02:05 salokod

Same issue here react-native-autocomplete-dropdown": "^2.1.0",

Thyago331 avatar May 10 '23 13:05 Thyago331

Same issue here react-native-autocomplete-dropdown": "^2.1.0",

this problem started for me when i updated all my packeges, so i tested all and using the [email protected] or higher the problem appears, so by using [email protected](latest stable version) it work fine

Thyago331 avatar May 11 '23 12:05 Thyago331

Same issue here react-native-autocomplete-dropdown": "^2.1.0",

this problem started for me when i updated all my packeges, so i tested all and using the [email protected] or higher the problem appears, so by using [email protected](latest stable version) it work fine

Good catch, thanks. I'll take a look once I'm done with my business

onmotion avatar May 11 '23 12:05 onmotion

I downgraded to [email protected] and it didn't work for me

salokod avatar May 12 '23 01:05 salokod

Got fixed by wrapping App.tsx with GestureHandlerRootView

import { GestureHandlerRootView } from 'react-native-gesture-handler';

return (
  <GestureHandlerRootView style={{ flex: 1 }}>
      ...
  </GestureHandlerRootView>)

And changed Flatlist import in node_modules/react-native-autocomplete-dropdown/src/Dropdown.js from import { FlatList } from 'react-native'; to import { FlatList } from 'react-native-gesture-handler';

so patch file patches/react-native-autocomplete-dropdown+2.1.1.patch look like this:

diff --git a/node_modules/react-native-autocomplete-dropdown/src/Dropdown.js b/node_modules/react-native-autocomplete-dropdown/src/Dropdown.js
index 003dc6d..9ae27b5 100644
--- a/node_modules/react-native-autocomplete-dropdown/src/Dropdown.js
+++ b/node_modules/react-native-autocomplete-dropdown/src/Dropdown.js
@@ -1,5 +1,6 @@
 import React, { memo, useMemo } from 'react'
-import { StyleSheet, FlatList, View, Keyboard } from 'react-native'
+import { StyleSheet, View, Keyboard } from 'react-native'
+import { FlatList } from 'react-native-gesture-handler';
 
 export const Dropdown = memo(
   ({

Villar74 avatar May 18 '23 09:05 Villar74

please try install v3. It requires additional steps, please read updated docs

onmotion avatar May 21 '23 12:05 onmotion

please try install v3. It requires additional steps, please read updated docs

@onmotion you forgot to update examples ^_^

v3 is working fine, gj!

Villar74 avatar May 22 '23 08:05 Villar74

please try install v3. It requires additional steps, please read updated docs

@onmotion you forgot to update examples ^_^

What's wrong with examples?

onmotion avatar May 22 '23 08:05 onmotion

please try install v3. It requires additional steps, please read updated docs

@onmotion you forgot to update examples ^_^

What's wrong with examples?

@onmotion There are still vector icons usage in example with fetch

Villar74 avatar May 22 '23 08:05 Villar74

Sorry, can't see, please send me a link

onmotion avatar May 22 '23 08:05 onmotion

@onmotion https://github.com/onmotion/react-native-autocomplete-dropdown#example-with-remote-requested-dataset

Villar74 avatar May 22 '23 08:05 Villar74

aah in the readme, damn. Thanks

onmotion avatar May 22 '23 08:05 onmotion