Skip to content

Implement OnScrollEndDrag Event Handler for ScrollView #14473

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

sharath2727
Copy link
Contributor

@sharath2727 sharath2727 commented Apr 2, 2025

Description

Type of Change

Enhancement (non-breaking change)

Why

Implement OnScrollEndDrag Event Handler for fabric implementation of ScrollView.

Resolves #13143

What

  1. Added FireScrollEndDrag handler to be fired when the InteractionTracker state is entering inertia - InertiaStateEntered
  2. Adjusted FireScrollBeginDrag to be fired when the InteractionTracker state is entering the interacting state - InteractingStateEntered method.

For reference: https://learn.microsoft.com/en-us/uwp/api/windows.ui.composition.interactions.interactiontracker?view=winrt-26100

Testing

Updated the ScrollViewSnapSample.tsx to include onScrollEndDrag event handler and verified the console prints onScrollEndDrag when interaction with scroller stops and lnertia state enters.

Optional: Used playground-composition.sln and metro server to test my changes.

Changelog

yes

Support OnScrollBeginDrag and OnScrollEndDrag event Handling for ScrollView

Microsoft Reviewers: Open in CodeFlow

@sharath2727 sharath2727 requested review from a team as code owners April 2, 2025 14:53
@sharath2727 sharath2727 self-assigned this Apr 2, 2025
@TatianaKapos
Copy link
Contributor

TatianaKapos commented Apr 2, 2025

@sharath2727 Can you fill out "Add a brief summary of the change to use in the release notes for the next release." We use that to create the release notes! Example here: https://github.com./microsoft/react-native-windows/releases/tag/react-native-windows_v0.77.0

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) label Apr 9, 2025
@jonthysell jonthysell self-requested a review April 10, 2025 23:09
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) label Apr 14, 2025
@anupriya13 anupriya13 linked an issue Apr 16, 2025 that may be closed by this pull request
@sharath2727 sharath2727 requested a review from acoates-ms April 18, 2025 06:12
@TatianaKapos
Copy link
Contributor

@sharath2727 RNW setup is a little different than other repos, we want to keep our branches clean to not clutter up the stable branches. PRs should come from your own forked repository of the react-native-windows repo, see https://github.com./microsoft/react-native-windows/blob/main/docs/contributing.md for more information! I think @Yajur-Grover also recorded some videos on how to do so!

This PR is fine but just going forward! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants