Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug-report] Picker && DatePicker 多个column同时快速滑动,停留值异常 #632

Closed
LLwanran opened this issue Dec 30, 2019 · 0 comments
Assignees
Labels
bug Something isn't working @Components Components related

Comments

@LLwanran
Copy link

Mand Mobile Version

2.5.7

Vue Version

2.6.1

Model / OS & Browser Info

iPhone 11 iOS13.0

Recurring Links

https://didi.github.io/mand-mobile/#/zh-CN/docs/components/feedback/date-picker

Recurring Steps

以“日期时间选择”demo为例,同时快速滑动5列,除了起始滑动列,其余全部停留异常,分别点击一下又恢复默认初始值。(易复现)

Expectant Behaviors

不要有异常停留列,如果滑动过快,希望恢复至初始值。

Actual Behaviors

同时快速滑动多列,除了起始滑动列,其余全部停留异常


在源码picker/picker-column.vue的$_onColumnScrollEnd(index)方法,只处理了isInvalid的情况,当activeItemIndex === this.activedIndexs[index]时直接return了,补充上逻辑则正常:

if (isInvalid || activeItemIndex === this.activedIndexs[index]) {
  isInvalid && this.$_scrollToValidIndex(scroller, index, activeItemIndex);
  activeItemIndex === this.activedIndexs[index] && this.$_scrollToIndex(scroller, index, activeItemIndex);
  return false;
}
@xxyan0205 xxyan0205 added @Components Components related bug Something isn't working labels Jan 2, 2020
@xxyan0205 xxyan0205 self-assigned this Jan 2, 2020
xxyan0205 added a commit that referenced this issue Jan 8, 2020
#633)

* fix(picker&date-picker): handling when rolling too fast & remove redundant padding

#632

* test(date-picker): fix test cases not idempotent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working @Components Components related
Projects
None yet
Development

No branches or pull requests

2 participants