Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,15 @@ void ScrollViewComponentView::updateProps(
if (oldViewProps.zoomScale != newViewProps.zoomScale) {
m_scrollVisual.Scale({newViewProps.zoomScale, newViewProps.zoomScale, newViewProps.zoomScale});
}

if (!oldProps || oldViewProps.snapToEnd != newViewProps.snapToEnd) {
// snapToEnd property is used with snapToOffsets to control whether
// the end of the scroll content should be treated as a snap point.
// This property is now accessible in Fabric ScrollView implementation.
// Note: Full snap functionality requires implementing snapToOffsets and
// the actual snapping behavior, which is not yet implemented in Fabric.
m_snapToEnd = newViewProps.snapToEnd;
}
}

void ScrollViewComponentView::updateState(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ struct ScrollInteractionTrackerOwner : public winrt::implements<
bool m_dismissKeyboardOnDrag = false;
double m_scrollEventThrottle{0.0};
bool m_allowNextScrollNoMatterWhat{false};
bool m_snapToEnd{true}; // Default to true per React Native documentation
std::chrono::steady_clock::time_point m_lastScrollEventTime{};
std::shared_ptr<facebook::react::ScrollViewShadowNode::ConcreteState const> m_state;
};
Expand Down