Skip to content

Commit 8faac7f

Browse files
committed
Fix overflow menu visibility for table
1 parent 42a59ae commit 8faac7f

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/dialog/overflow-menu/overflow-menu.directive.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,25 @@ export class OverflowMenuDirective extends DialogDirective {
5151

5252
onDialogInit() {
5353
this.dialogConfig.content = this.ibmOverflowMenu;
54+
this.dialogService.isClosed.subscribe(() => this.updateOpacity());
55+
}
56+
57+
open() {
58+
super.open();
59+
this.updateOpacity();
60+
}
61+
62+
toggle() {
63+
super.toggle();
64+
this.updateOpacity();
65+
}
66+
67+
updateOpacity() {
68+
if (this.elementRef.nativeElement.getAttribute("aria-expanded") === "true") {
69+
this.elementRef.nativeElement.style.opacity = 1;
70+
} else {
71+
this.elementRef.nativeElement.style.opacity = null;
72+
}
5473
}
5574

5675
@HostListener("keydown", ["$event"])

0 commit comments

Comments
 (0)