Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 31 additions & 31 deletions src/material-experimental/mdc-list/list-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,37 @@ import {
MatListItemAvatar,
} from './list-item-sections';

@Directive({
host: {
'[class.mat-mdc-list-non-interactive]': '_isNonInteractive',
'[attr.aria-disabled]': 'disabled',
},
})
/** @docs-private */
export abstract class MatListBase {
_isNonInteractive: boolean = true;

/** Whether ripples for all list items is disabled. */
@Input()
get disableRipple(): boolean {
return this._disableRipple;
}
set disableRipple(value: BooleanInput) {
this._disableRipple = coerceBooleanProperty(value);
}
private _disableRipple: boolean = false;

/** Whether all list items are disabled. */
@Input()
get disabled(): boolean {
return this._disabled;
}
set disabled(value: BooleanInput) {
this._disabled = coerceBooleanProperty(value);
}
private _disabled = false;
}

@Directive({
host: {
'[class.mdc-list-item--disabled]': 'disabled',
Expand Down Expand Up @@ -274,37 +305,6 @@ export abstract class MatListItemBase implements AfterViewInit, OnDestroy, Rippl
}
}

@Directive({
host: {
'[class.mat-mdc-list-non-interactive]': '_isNonInteractive',
'[attr.aria-disabled]': 'disabled',
},
})
/** @docs-private */
export abstract class MatListBase {
_isNonInteractive: boolean = true;

/** Whether ripples for all list items is disabled. */
@Input()
get disableRipple(): boolean {
return this._disableRipple;
}
set disableRipple(value: BooleanInput) {
this._disableRipple = coerceBooleanProperty(value);
}
private _disableRipple: boolean = false;

/** Whether all list items are disabled. */
@Input()
get disabled(): boolean {
return this._disabled;
}
set disabled(value: BooleanInput) {
this._disabled = coerceBooleanProperty(value);
}
private _disabled = false;
}

/**
* Sanity checks the configuration of the list item with respect to the amount
* of lines, whether there is a title, or if there is unscoped text content.
Expand Down