flexbox-layout icon indicating copy to clipboard operation
flexbox-layout copied to clipboard

Preventing negative child width when shrinking on no wrap

Open siczmj opened this issue 4 months ago • 0 comments

This minor change fixes an issue where a child view may have a negative width during shrinking in no wrap flex wrap mode. If you look at the playground app, you will be able to reproduce it by setting the wrap mode to no wrap, and merely add more than 10 items. The horizontal FlexLine measurement going to be modified incorrectly due to a negative child view width. This may happen if a child view is already narrow and you force to shrink more.

Issue before fix Correct behavior after fix
no-wrap-shrinking-issue-negative-child-measure-width no-wrap-shrinking-fix-negative-child-measure-width

siczmj avatar Apr 22 '24 19:04 siczmj