Skip to content

Commit

Permalink
fix: add 1 to data.length to show missing data
Browse files Browse the repository at this point in the history
- added +1 to `initialNumToRender` prop to fix index error in `SectionList` when date
  selected from calendar is changed

SVA-665
  • Loading branch information
ardasnturk committed Jun 26, 2023
1 parent a748914 commit 6dd528d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/EventList.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const EventList = ({
return (
<SectionList
initialNumToRender={
data?.length < MAX_INITIAL_NUM_TO_RENDER ? data.length : MAX_INITIAL_NUM_TO_RENDER
data?.length < MAX_INITIAL_NUM_TO_RENDER ? data.length + 1 : MAX_INITIAL_NUM_TO_RENDER
}
keyExtractor={keyExtractor}
ListFooterComponent={() => {
Expand Down

0 comments on commit 6dd528d

Please sign in to comment.