Open EchoDongYu opened 2 months ago
There is something wrong with the flingBehavior when use in Dialog or ModalBottomSheet,It will bounces back when it fling or drag to the bottom
问题在于 onScrollFinished 中的 snappedIndex 可能会越界,如下替换可解决问题
onScrollFinished
snappedIndex
val newDayOfMonth = if (snappedIndex >= dayOfMonths.size) dayOfMonths.last().value else dayOfMonths.find { it.index == snappedIndex }?.value
There is something wrong with the flingBehavior when use in Dialog or ModalBottomSheet,It will bounces back when it fling or drag to the bottom![动画](https://github.com/commandiron/WheelPickerCompose/assets/59862330/aea68e29-b5d8-4ddd-a098-d958c5a9f35a)