Skip to content

Commit

Permalink
CrossAxisWrapMode.Dynamic documentation - specify dimension is adjust…
Browse files Browse the repository at this point in the history
…ed while scrolling

Summary:
we in IGTX recently tried using CrossAxisWrapMode.Dynamic.  Based on the documentation, we were expecting the height of our H-Scroll Pager to wrap around the largest card, precomputed upfront.  Turns out the expected behavior is not to precompute the heights, but rather to adjust to the tallest as the user scrolls, dynamically.
Wondering if y'all thought the wording in this diff offers a clearer description of its capabilities.  Feel free to disregard if not!

Reviewed By: pentiumao

Differential Revision: D69559580

fbshipit-source-id: 3b35e4e483bbc56a9bee3ec8a7731b4c2ac07f82
  • Loading branch information
Stephen Chyau authored and facebook-github-bot committed Feb 14, 2025
1 parent 4df6d4b commit f6c3f1c
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ enum class CrossAxisWrapMode {
MatchFirstChild,

/**
* The cross axis dimension will match the largest item in the [Collection]. Measuring all the
* children comes with a high performance cost, especially for infinite scrolls. This should only
* be used if absolutely necessary.
* The cross axis dimension will match the largest item seen so far in the [Collection]. The
* dimension is adjusted dynamically (ie: during scrolling). Measuring all the children comes with
* a high performance cost, especially for infinite scrolls. This should only be used if
* absolutely necessary.
*
* This is an experimental feature and your Section surface will take a perf hit if you use it.
*
Expand Down

0 comments on commit f6c3f1c

Please sign in to comment.