Skip to content

Commit

Permalink
Fix event dispatch names for momentum scroll (#12278)
Browse files Browse the repository at this point in the history
* Fix event dispatch names for momentum scroll

In 03701dc, we replaced the ViewManager configured event names to match the ones used by Fabric, but never changed the events that get dispatched on Paper.

* Change files
  • Loading branch information
rozele committed Oct 23, 2023
1 parent 350133d commit 1367b74
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Fix event dispatch names for momentum scroll",
"packageName": "react-native-windows",
"email": "ericroz@meta.com",
"dependentChangeType": "patch"
}
4 changes: 2 additions & 2 deletions vnext/Microsoft.ReactNative/Views/ScrollViewManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ void ScrollViewShadowNode::AddHandlers(const winrt::ScrollViewer &scrollViewer)
EmitScrollEvent(
scrollViewerNotNull,
m_tag,
L"topScrollBeginMomentum",
L"topMomentumScrollBegin",
args.NextView().HorizontalOffset(),
args.NextView().VerticalOffset(),
args.NextView().ZoomFactor(),
Expand Down Expand Up @@ -299,7 +299,7 @@ void ScrollViewShadowNode::AddHandlers(const winrt::ScrollViewer &scrollViewer)
EmitScrollEvent(
scrollViewer,
m_tag,
L"topScrollEndMomentum",
L"topMomentumScrollEnd",
scrollViewer.HorizontalOffset(),
scrollViewer.VerticalOffset(),
scrollViewer.ZoomFactor(),
Expand Down

0 comments on commit 1367b74

Please sign in to comment.