Repository navigation
fix(forms): provide a method to compare options - #13349
DzmitryShylovich wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
compareOptions/ equalOptions ?
compare implies 1, 0, -1 return... probably overkill.
There was a problem hiding this comment.
compare implies 1, 0, -1 return
yeah, this is why I chose equals. We don't need to sort it.
|
LGTM, @kara could you please review ? |
kara
left a comment
There was a problem hiding this comment.
Can you also add a test for this?
There was a problem hiding this comment.
Hmm, I like the idea of an optional equality method, but I don't think this name is very intuitive. Perhaps compareWith? Discussed with @StephenFluin and we think that might fit the use case better.
<select [compareWith]="compareFn" [(ngModel)]="someProp">
...
</select>|
@kara ready for review |
|
Is a release date known for this feature? It would help a lot :) |
|
@JosephBL this feature has been released for many months. (since |
|
Thanks a lot, I somehow missed it :$ |
|
Thanks a lot |
|
Faced an issue with this compare, if the select is inside the form /formgroup, with name , compare is not working |
|
As @chinthu said, if the select is in a form the compare function doesn't work properly. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Closes #13268 and #13274 / #13828 / #13884 #14121
Usage: