[ListView] Sticky header index 0 was outside the range {0, 0}
See original GitHub issueI sometimes get the following redbox:
Sticky header index 0 was outside the range {0, 0}
Debugging brought me to ScrollView.m to the following line:
if (idx >= subviewCount) {
RCTLogError(@"Sticky header index %zd was outside the range {0, %zd}", idx, subviewCount);
return;
}
For me it helped to change it to
if (idx > subviewCount) {
Although I havent tried to understand the entire function up to now, the error message “Sticky header index %zd was outside the range {0, %zd}” seems to suggest that it has to be “>” instead of “>=”, at least for my case where idx is 0 and subviewCount is 0 as well.
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Sticky Component inside scrollview - react native
It is very simple with ScrollView component. There is already something called "stickyHeaderIndices" which takes the index of child to make ...
Read more >ListView - Android Developers
A class that represents a fixed view in a list, for example a header at the top or a ... android:alpha, alpha property...
Read more >sticky_headers | Flutter Package - Pub.dev
Flutter Sticky Headers - Lets you place headers on scrollable content that will stick to the top of the container whilst the content...
Read more >Element: <oj-data-grid> - Oracle
If in the column end header, move focus to upside in a contiguous data range including the level 0 of the active index...
Read more >ListView.cs - Reference Source - Microsoft
CreateKey(); private int updateCounter = 0; // the counter we use to track how many ... This includes the column header when item...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For me it is the DatePickerIOS which is causing this issue. I kind of hate DatePickerIOS right now.
Sometimes if renderRow (or the other render methods) throw an error, you end up getting a native error about the sticky headers instead.