MaterialListItemComponent class
Material List Item is a block element intended for user interaction; it has
:hover
styling and emits and trigger
event when the user clicks or
presses enter
or space
keys.
See MaterialListComponent
for item grouping and labelling.
Note: If the material-list-item has a DropdownHandle in its ancestry, the dropdown will be closed on triggering (i.e. clicking or pressing enter/space on) the list item if closeOnActivate is true.
- Inheritance
-
- Object
- RootFocusable
- ButtonDirective
- MaterialListItemComponent
- Annotations
-
- @Component(selector: 'material-list-item', providers: [ExistingProvider(HasDisabled, MaterialListItemComponent)], styleUrls: ['material_list_item.scss.css'], template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.onPush)
Constructors
- MaterialListItemComponent(HtmlElement element, @Optional() DropdownHandle? _dropdown, @Attribute('tabindex') String? tabIndex, @Attribute('role') String? role)
Properties
- ariaRole → String?
-
no setterinherited
- closeOnActivate ↔ bool
-
Whether the encompassing dropdown should close on selection of
this item.
getter/setter pair
- disabled ↔ bool
-
Is the component disabled.
getter/setter pairoverride
- disabledStr → String
-
String value to be passed to aria-disabled.
no setterinherited
- element ↔ HtmlElement
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hostTabIndex → String
-
final
- role ↔ String?
-
Role of this component used for a11y.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tabbable ↔ bool
-
Is the component tabbable.
getter/setter pairinherited
- tabIndex → String?
-
no setterinherited
- tabindex ← String?
-
The tab index of the component.
no getterinherited
-
trigger
→ Stream<
UIEvent> -
Fired when the button is activated via click, tap, or key press.
no setterinherited
Methods
-
dispose(
) → void -
Disposes this disposable and any resources it has open.
inherited
-
focus(
) → void -
Item/component focuses itself
inherited
-
handleActivate(
UIEvent _) → void -
handleClick(
MouseEvent mouseEvent) → void -
Triggers if not disabled.
inherited
-
handleKeyPress(
KeyboardEvent keyboardEvent) → void -
Triggers on enter and space if not disabled.
inherited
-
ngOnDestroy(
) → void - Executed before the directive is removed from the DOM and destroyed.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateTabIndex(
) → void -
Use this method if you want to manually compute and cache the tab index.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited