Repository navigation
feat(select): add compareWith Input for object value comparison - #11965
Merged
Merged
Conversation
added 3 commits
June 7, 2017 13:26
manucorporat
suggested changes
Jun 8, 2017
| }); | ||
| } else { | ||
| option.selected = this.getValues().some(selectValue => { | ||
| return isCheckedProperty(selectValue, option.value); |
Contributor
There was a problem hiding this comment.
what is isCheckedProperty is the default, compare function? this way we don't have to duplicate code. does it make sense?
zakton5
commented
Jun 8, 2017
manucorporat
reviewed
Jun 8, 2017
| } | ||
| this._compareWith = fn; | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
can you move private _compareWith: (o1: any, o2: any) => boolean = isCheckedProperty; just below _text: string = ''; (line 180)? also, drop the private property.
Contributor
yeah! now looks beautiful |
zakton5
commented
Jun 8, 2017
zakton5
left a comment
Contributor
Author
There was a problem hiding this comment.
@manucorporat How's this?
Contributor
|
@zakton5 looks perfect now! but I prefer to wait until next version (3.5). 3.4 is scheduled for next wednesday. |
Contributor
Author
|
Alright, thanks for your help! |
Contributor
|
Thanks a lot for the PR!! |
Contributor
Author
|
@manucorporat No problem! Thanks for your help |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description of what this resolves:
Selects that use objects as values can end up with different object identities than the currently selected object, resulting in blank selects. More details provided in Angular link below.
Changes proposed in this pull request:
Leverage the same principle used in Angular's compareWith
Ionic Version: 3.x
Fixes: #6625
Sorry about the multiple commits