mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
[PM-7683] Fix dynamic item defects (#9575)
* [PM-8639] Add data-testid attribute for test automation * [PM-8669] Add autofill aria label * [PM-8674] Show autofill menu options for card/identities when not in the autofill suggestion list * [PM-8635] Hide menu items when copy cipher field directive is disabled * [PM-8636] Disable copy menu dropdown when no items available to copy * [CL-309] Add title override to bitBadge * [PM-8669] Update menu-item directive disabled input * [PM-7683] Fix race condition for remainingCiphers$ * [PM-7683] Use strict equality check
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { FocusableOption } from "@angular/cdk/a11y";
|
||||
import { Component, ElementRef, HostBinding } from "@angular/core";
|
||||
import { coerceBooleanProperty } from "@angular/cdk/coercion";
|
||||
import { Component, ElementRef, HostBinding, Input } from "@angular/core";
|
||||
|
||||
@Component({
|
||||
selector: "[bitMenuItem]",
|
||||
@@ -32,6 +33,11 @@ export class MenuItemDirective implements FocusableOption {
|
||||
];
|
||||
@HostBinding("attr.role") role = "menuitem";
|
||||
@HostBinding("tabIndex") tabIndex = "-1";
|
||||
@HostBinding("attr.disabled") get disabledAttr() {
|
||||
return this.disabled || null; // native disabled attr must be null when false
|
||||
}
|
||||
|
||||
@Input({ transform: coerceBooleanProperty }) disabled?: boolean = false;
|
||||
|
||||
constructor(private elementRef: ElementRef) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user