Open absar opened 1 year ago
Fixed in PR #25. Added a new parameter to not shrink wrap list items using S2ChoiceConfig.shrinkWrap
or SmartSelect.single.choiceShrinkWrap
/SmartSelect.multiple.choiceShrinkWrap
. If choiceShrinkWrap
is true choices list will shrink wrap the choices, causing the list to resize based on the number of available choices, by default it will shrink wrap which was the default behavior before this change.
Usage:
SmartSelect<T?>.single(
choiceShrinkWrap: false
);
SmartSelect<T?>.multiple(
choiceShrinkWrap: false
);
The default behavior of shrink wrapping items has a bad UX as the list resizes when the number of available choices are changed e.g. when user taps to select a different set of items, which should be made configurable so that it could be disabled, while keeping the default behavior intact for backward compatibility.
Current behavior:
https://user-images.githubusercontent.com/1186833/193661862-711bf2e4-a02d-4631-b50a-bf7d16e0614a.mp4
Expected behavior:
https://user-images.githubusercontent.com/1186833/193662046-45fde1d8-bf35-4470-ac4a-ad1338e7550f.mp4