react-native-autocomplete-dropdown
react-native-autocomplete-dropdown copied to clipboard
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
Hi! Yes, it's because it using FlatList
component for rendering dropdown items. It's strange that you can see a warn because it disabled inside the lib: https://github.com/onmotion/react-native-autocomplete-dropdown/blob/c8406cfa22929beb60445b9856a7710f7a2c84b2/src/index.js#L48
Anyway, if you don't want to use FlatList
try to consider lib version below 2.0.0
Hi! Yes, it's because it using
FlatList
component for rendering dropdown items. It's strange that you can see a warn because it disabled inside the lib:https://github.com/onmotion/react-native-autocomplete-dropdown/blob/c8406cfa22929beb60445b9856a7710f7a2c84b2/src/index.js#L48
Anyway, if you don't want to use
FlatList
try to consider lib version below 2.0.0
Surely it can't be a solution to use an older version?!
In any case, a definite thanks for the library!
Thanks we already solved this issue :)
Thanks we already solved this issue :)
Hi! Please drop your solution here if you can 🙂
Thanks we already solved this issue :)
How?
Thanks we already solved this issue :)
How did you solve it? i also have same issue and unable to fix it.
Thanks we already solved this issue :)
Viva Las Vegas how?
Look at example (uses scrollview): https://github.com/onmotion/react-native-autocomplete-dropdown/tree/main/example
https://github.com/onmotion/react-native-autocomplete-dropdown/issues/62#issuecomment-1520048916
hi @onmotion, is this issue solved yet?
If you want to disable a warning, you could apply such workaround
import { LogBox } from 'react-native'
if (__DEV__) {
const ignoreWarns = [
'VirtualizedLists should never be nested'
'Non-serializable values were found in the navigation state.',
"The action 'POP_TO_TOP'",
/Could not find image.*data:image/, // met on iOS if load .svg that contains href base64 (footer game providers)
]
const warn = console.warn
console.warn = (...arg) => {
for (const warning of ignoreWarns) {
if (warning instanceof RegExp) {
if (warning.test(arg[0])) {
return
}
} else if (arg[0].startsWith(warning)) {
return
}
}
warn(...arg)
}
LogBox.ignoreLogs(ignoreWarns)
}