Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component from the example isn't scrollable on Android #79

Open
mirco123 opened this issue May 8, 2023 · 14 comments
Open

Component from the example isn't scrollable on Android #79

mirco123 opened this issue May 8, 2023 · 14 comments

Comments

@mirco123
Copy link
Contributor

mirco123 commented May 8, 2023

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 (

        <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>);`
@longtm101898
Copy link

I've same issue

@salokod
Copy link

salokod commented May 10, 2023

Same issue here

@Thyago331
Copy link

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

@Thyago331
Copy link

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

@onmotion
Copy link
Owner

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

@salokod
Copy link

salokod commented May 12, 2023

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

@Villar74
Copy link
Contributor

Villar74 commented May 18, 2023

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(
   ({

@onmotion
Copy link
Owner

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

@Villar74
Copy link
Contributor

Villar74 commented May 22, 2023

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

@onmotion you forgot to update examples ^_^

v3 is working fine, gj!

@onmotion
Copy link
Owner

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

@onmotion you forgot to update examples ^_^

What's wrong with examples?

@Villar74
Copy link
Contributor

Villar74 commented May 22, 2023

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

@onmotion
Copy link
Owner

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

@onmotion
Copy link
Owner

aah in the readme, damn. Thanks

wangdaliu pushed a commit to wangdaliu/react-native-autocomplete-dropdown that referenced this issue Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants