-
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(bottom-sheet): allow disableClose to be updated after opened #14711
fix(bottom-sheet): allow disableClose to be updated after opened #14711
Conversation
Allows for the `disableClose` value of a bottom sheet to be updated after it has been opened, similarly to `MatDialog`. Fixes angular#14708.
@@ -42,6 +45,7 @@ export class MatBottomSheetRef<T = any, R = any> { | |||
// @breaking-change 8.0.0 `_location` parameter to be removed. | |||
_location?: Location) { | |||
this.containerInstance = containerInstance; | |||
this.disableClose = containerInstance.bottomSheetConfig.disableClose; |
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.
Will this potentially change the behavior since you are setting the value in the class instead of reading it from the object at the time of the check?
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 won't change the behavior, because the old approach only read it once on init.
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.
Ahh, yes because it set up the subscription based on that. Makes sense.
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
@@ -42,6 +45,7 @@ export class MatBottomSheetRef<T = any, R = any> { | |||
// @breaking-change 8.0.0 `_location` parameter to be removed. | |||
_location?: Location) { | |||
this.containerInstance = containerInstance; | |||
this.disableClose = containerInstance.bottomSheetConfig.disableClose; |
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.
Ahh, yes because it set up the subscription based on that. Makes sense.
…ular#14711) Allows for the `disableClose` value of a bottom sheet to be updated after it has been opened, similarly to `MatDialog`. Fixes angular#14708.
…ular#14711) Allows for the `disableClose` value of a bottom sheet to be updated after it has been opened, similarly to `MatDialog`. Fixes angular#14708.
) Allows for the `disableClose` value of a bottom sheet to be updated after it has been opened, similarly to `MatDialog`. Fixes #14708.
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. |
Allows for the
disableClose
value of a bottom sheet to be updated after it has been opened, similarly toMatDialog
.Fixes #14708.