fix(Picker): should reset subsequent columns when a column is changed#13366
fix(Picker): should reset subsequent columns when a column is changed#13366JerryWu1234 wants to merge 1 commit intoyouzan:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13366 +/- ##
==========================================
+ Coverage 89.60% 89.81% +0.20%
==========================================
Files 257 257
Lines 7013 7048 +35
Branches 1736 1746 +10
==========================================
+ Hits 6284 6330 +46
+ Misses 384 379 -5
+ Partials 345 339 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@inottn Please help to review. I done and fixed all fail tests . |
|
I don't know if the previous interactions were intentional; if there is an issue, the onChange logic might need to be modified. If I have time, I will see how to adjust it. |
I definitely sure that it wasn't intentional. and it is a bug. |
|
thanks for point out. |
|
I prefer to keep the current behavior. If we reset the option it will break the user experience of date picker or time picker. |
ok, if we keep the current behavior. |
|
How about adding a new prop to enable this new behavior? Such as |
I think the default should be |
|
@chenjiahan @inottn I done. |
|
@inottn please help to review. because my production needs this feature , thanks |
Sorry for the delay. Vant is currently community-driven, and PR reviews might not be prompt, I've been very busy lately, and I apologize again. If needed, you can temporarily resolve issues using methods like pnpm patch. |
Please don't forget my PR |
@JerryWu1234 You have been forgotten .... |
inottn
left a comment
There was a problem hiding this comment.
参考了其他组件库的设计,Picker 支持两种模式:级联模式和非级联模式。在级联模式下,上下级选项存在关联关系,当上级选项变更时,下级会自动重置为第一项,这种设计是合理且用户体验友好的。而 DatePicker 等组件采用的是非级联模式,因此不会受到这种联动逻辑的影响。
|
thanks for your approval |
… is changed somehow
fixes: #13365
add a new property for resetChildren
Before submitting a pull request, please read the contributing guide.
在提交 pull request 之前,请阅读 贡献指南。