-
Notifications
You must be signed in to change notification settings - Fork 173
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
Invariant Violation: scrollToIndex out of range: requested index 101 is out of 0 to 36 #22
Comments
I'm working on it. |
This issue has been resolved. Please install later version 1.5.4 |
yes now it's working, Thanks !! |
now its again getting the same error if we use 2 dropdowns with search functionality steps to reproduce: |
Thanks, I'm working on it. |
Can you give me sample code? |
I cannot reproduce this error. Please provided video. |
Please install version 1.5.5. |
I'm also getting this error but only when I set predefine dropdown value, If dropdown value is empty it works perfectly. react-native-element-version: 1.5.8 |
hi @akshy78695 , |
hi @akshy78695 , |
hi @hoaphantn7604 now getting same error with different condition
|
In library components Dropdown directory index.tsx file, if you added Flatlist props initialNumToRender={listData.length} then you are able to auto-scroll to 250 or 300 records. Also if we added props for this functionality that's helpful to user who is use this library. |
This dropdown library is great but I have the same problem, ERROR Invariant Violation: scrollToIndex out of range: item length 0 but minimum is 1, js engine: hermes |
@hoaphantn7604 This issue is still there if the options list is long. Please review this PR as it has a potential solution for the error: #253 |
I am using a dropdown for the country data and it contains more than 150 data, without search, it is working fine but with search it is throwing error of " Invariant Violation: scrollToIndex out of range: requested index 101 is
out of 0 to 36 "
import { Dropdown } from 'react-native-element-dropdown';
import { ScrollView, Text, TextInput, View } from 'react-native';
return (
<Text style={[styles.regularText, styles.f15]} numberOfLines={1}>
Country/Region
<Dropdown
style={[styles.dropdown, styles.lightText]}
data={allCountries}
labelField="label"
valueField="label"
placeholder="Select Country"
value={country}
onChange={(item) => {
setcountry(item.label);
}}
renderItem={_renderItem}
selectedTextStyle={[styles.selectedText, styles.mediumText]}
placeholderStyle={[styles.selectedText, styles.mediumText]}
maxHeight={300}
search
autoScroll={true}
searchPlaceholder="Search..."
inputSearchStyle={{ height: 40, fontSize: 13, }}
iconColor={colors.primary}
/>
)
The text was updated successfully, but these errors were encountered: