-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
fix: “cascader” repair unexpected error #21759
Conversation
Co-authored-by: louie <liguanzhi@youxin.cloud>
@louiebb 你好,我是element-ui官方维护团队的xinguanhua,非常感谢你以pr的方式,为element-ui组件库的完善贡献了一份力量。element-ui有一份礼物将会寄给你,希望能够提供寄件地址及联系方式,可以发送邮件到 xinguanhua@gmail.com。 |
@louiebb 你好,最后截止时间是2月26日,过期不候哦~ |
出现类似bug。@xinguanhua
|
Please make sure these boxes are checked before submitting your PR, thank you!
dev
branch.Scenes:
"cascader" changes depending on the change of a certain A field. After returning, change the A field, clear the "value" of "cascader" and the "options" of "cascader", and initiate an interface request at the same time, get data A after the request, and put the data A is assigned to "cascader options", and an error occurs
problem causes:
The watch queue of the cascader-panel file is ["options", "value"]. When the value is cleared and the options are cleared, the execution order is the options monitoring event, and then the value monitoring event. The function call chain in the options monitoring event is as follows,
Function call chain:
options(handler) > initStore > syncMenuState > syncActivePath > getNodeByValue(node.getValue()) get [ null ] > expandNodes > handleExpand
Reproduce address
Detailed article
solution:
The watch queue is modified to [ "value", "options"]