-
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
feat(cdk/stepper): emit event when the user interacts with a step #22400
feat(cdk/stepper): emit event when the user interacts with a step #22400
Conversation
src/cdk/stepper/stepper.ts
Outdated
interacted = false; | ||
|
||
/** Emits when the user has attempted to move away from the step. */ | ||
@Output('interacted') interactedStream: EventEmitter<CdkStep> = new EventEmitter<CdkStep>(); |
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.
I'm a little on the fence about the naming here. I think that interacted
sounds more like an event name, but we already used it for the interacted
property. I'm open to other naming suggestions.
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.
Would it make sense to call it touched
or is this a slightly different idea?
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.
It sort of is like touched
, but I was trying to avoid using the same terminology is forms to avoid confusion.
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.
interacted
sounds fine to me, but I think we normally call our streams xChanges
cc @jelbourn in case he has any naming opinions
5588975
to
9710d3f
Compare
src/cdk/stepper/stepper.ts
Outdated
interacted = false; | ||
|
||
/** Emits when the user has attempted to move away from the step. */ | ||
@Output('interacted') interactedStream: EventEmitter<CdkStep> = new EventEmitter<CdkStep>(); |
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.
interacted
sounds fine to me, but I think we normally call our streams xChanges
cc @jelbourn in case he has any naming opinions
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.
interacted
isn't my favorite API, but I don't have anything better
Adds an `interacted` event that will emit when the user tries to move away from a step. Fixes angular#19918.
9710d3f
to
3611b0f
Compare
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. |
Adds an
interacted
event that will emit when the user tries to move away from a step.Fixes #19918.