Skip to content
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

feat(infiniteAgendaList): support passing scrollViewProps #2497

Merged
merged 3 commits into from
Jul 11, 2024

Conversation

yakirza17
Copy link
Contributor

@yakirza17 yakirza17 commented Jul 10, 2024

Since the AgendaListProps extends SectionListProps we can receive any section list props.
This PR just moves them to the right place inside InfiniteAgendaList

@yakirza17 yakirza17 marked this pull request as ready for review July 10, 2024 13:51
@@ -244,7 +243,7 @@ const InfiniteAgendaList = (props: AgendaListProps) => {
layoutProvider={layoutProvider}
onScroll={_onScroll}
onVisibleIndicesChanged={_onVisibleIndicesChanged}
scrollViewProps={{onMomentumScrollEnd: _onMomentumScrollEnd, nestedScrollEnabled: true, refreshControl}}
scrollViewProps={{nestedScrollEnabled: true, ...props, onMomentumScrollEnd: _onMomentumScrollEnd}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're passing all the props... this can cause a problem for example to the onScroll we pass the _onScroll and now scrollViewProps gets the props.onScroll. I don't like it. IMO is is better to create a proper const _scrollViewProps that passes only the relevant props with regard to what we want the user to override and what not

@Inbal-Tish Inbal-Tish self-assigned this Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants