-
Notifications
You must be signed in to change notification settings - Fork 4k
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
当nzSelect组件绑定的值为数组时,默认值没有被选中 #4139
Comments
Translation of this issue:When the value bound to the nzSelect component is an array, the default value is not selected.Reproduction link[https://stackblitz.com/edit/angular-73fp31?embed=1&file=src/app/app.component.ts](https://stackblitz.com/edit/angular-73fp31?embed=1&file=src/ App/app.component.ts) Steps to reproduceThe value of nzValue of nzSelect's option is an array, and the value of ngModel binding is also an array. Custom compareWith function, when the first value in the array is equal, the corresponding option is selected. However, the actual default options are not selected. But when I change the value of the binding to an object, it can be selected normally, and the array will not work. What is expected?When the value bound to the nzSelect component is an array, the option that conforms to the compareWith function is selected by default. What is actually happening?The option to match the compareWith function is not selected
|
Reproduction link
https://stackblitz.com/edit/angular-73fp31?embed=1&file=src/app/app.component.ts
Steps to reproduce
nzSelect的option的nzValue的值为数组,ngModel绑定的值也为数组,自定义compareWith函数,当数组中的第一个值相等时,使对应的option被选中。但实际默认选项确未被选中。但当我把绑定的值改为对象时,却可以正常选中,数组就不行
What is expected?
当nzSelect组件绑定的值为数组时,符合compareWith函数的选项被默认选中
What is actually happening?
符合compareWith函数的选项未被选中
The text was updated successfully, but these errors were encountered: