Skip to content

Commit

Permalink
refactor: set the number of cells to render to 20 at startup
Browse files Browse the repository at this point in the history
- adjusted the number of cells to be rendered initially, regardless of the size of the dataset,
  according to `MAX_INITIAL_NUM_TO_RENDER`

SVA-665
  • Loading branch information
ardasnturk committed Jun 28, 2023
1 parent e7ce03c commit 1588ac1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/EventList.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ export const EventList = ({

return (
<SectionList
initialNumToRender={
data?.length < MAX_INITIAL_NUM_TO_RENDER ? data.length + 1 : MAX_INITIAL_NUM_TO_RENDER
}
initialNumToRender={MAX_INITIAL_NUM_TO_RENDER}
keyExtractor={keyExtractor}
ListFooterComponent={() => {
if (data?.length >= MAX_INITIAL_NUM_TO_RENDER) {
Expand Down

0 comments on commit 1588ac1

Please sign in to comment.