-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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(api): updates the api to standard naming and adds docs for selection #8286
Conversation
src/cdk/collections/collections.md
Outdated
### `SelectionModel` | ||
`SelectionModel` is a utility for powering selection of one or more options from a list. | ||
This utility is used in components such as the selection list, table selections and chip lists. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like
`SelectionModel` stores the selection state for components that support multiple selection.
The word "utility" isn't a good fit here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about model
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That works
@@ -34,7 +34,13 @@ export class SelectionModel<T> { | |||
} | |||
|
|||
/** Event emitted when the value has changed. */ | |||
onChange: Subject<SelectionChange<T>> | null = this._emitChanges ? new Subject() : null; | |||
changed: Subject<SelectionChange<T>> | null = this._emitChanges ? new Subject() : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't we land on change
present-tense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We landed on myEventThingChange
but the rest of them ended up past tense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which things are changed
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few I know of selectedChanged
, _scrollDistanceChanged
and _selectedIndexChanged
. Let me know what you want to do.
Hi @amcdnl! This PR has merge conflicts due to recent upstream merges. |
1 similar comment
Hi @amcdnl! This PR has merge conflicts due to recent upstream merges. |
bump @jelbourn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last comment
|
||
/** | ||
* Event emitted when the value has changed. | ||
* @deprecated Use `changed` instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to add a deletion-target here (8.0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Commit message fix-up: should use |
@amcdnl github shows this PR as having no conflicts, but our presubmit script thinks it does. Could you rebase it? |
…ostics * Currently if the node of a diagnostic couldn't be resolved, or the `className` is not part of the upgrade data, we accidentally `return` instead of `continuing` the `for of` loop that checks every determined diagnostic. * Adds missing upgrade data for a V7 merged breaking change: angular#8286 * Renames the `test-cases/v5` directory to `test-cases/v6` because the test-cases are running against version target: `v6`. * Adds test cases for V7 constructor checks data; test cases for property name change from angular#8286
…ostics (#13103) * Currently if the node of a diagnostic couldn't be resolved, or the `className` is not part of the upgrade data, we accidentally `return` instead of `continuing` the `for of` loop that checks every determined diagnostic. * Adds missing upgrade data for a V7 merged breaking change: #8286 * Renames the `test-cases/v5` directory to `test-cases/v6` because the test-cases are running against version target: `v6`. * Adds test cases for V7 constructor checks data; test cases for property name change from #8286
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. |
This PR updates the change event in
SelectionModel
fromonChange
tochanged
to match the new api standard. It also adds basic docs for the selection model utility.