Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit 0341813

Browse files
Googlernshahan
authored andcommitted
Adds canClose boolean to material-temporary drawer which (if true) prevents the drawer from toggling
PiperOrigin-RevId: 260173329
1 parent 7b47ac5 commit 0341813

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

angular_components/lib/app_layout/material_temporary_drawer.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,11 @@ class MaterialTemporaryDrawerComponent extends MaterialDrawerBase {
3434
// should also block keyboard selection outside of the drawer, while open.
3535
@HostListener('click')
3636
@override
37-
void toggle() => super.toggle();
37+
void toggle() {
38+
if (visible && !canClose) return;
39+
super.toggle();
40+
}
41+
42+
@Input()
43+
bool canClose = true;
3844
}

0 commit comments

Comments
 (0)