Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

feat(list): Remove interactive property #2258

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
20 changes: 0 additions & 20 deletions demos/src/app/components/list/examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ <h3 class="demo-content__headline">Custom</h3>
<div class="demo-layout__row">
<button mdc-button (click)="custom.wrapFocus = !custom.wrapFocus">Wrap
Focus: {{custom.wrapFocus ? 'On' : 'Off'}}</button>
<button mdc-button (click)="custom.interactive = !custom.interactive">Interactive:
{{custom.interactive ? 'On' :
'Off'}}</button>
<button mdc-button (click)="custom.disableRipple = !custom.disableRipple">Disable
Ripple: {{custom.disableRipple ?
'On' :
Expand Down Expand Up @@ -95,9 +92,6 @@ <h3 class="demo-content__headline">Single-Line</h3>
<button mdc-button (click)="singleline.singleSelection = !singleline.singleSelection">Single
Selection:
{{singleline.singleSelection ? 'On' : 'Off'}}</button>
<button mdc-button (click)="singleline.interactive = !singleline.interactive">Interactive:
{{singleline.interactive
? 'On' : 'Off'}}</button>
</div>
<mdc-list #singleline>
<mdc-list-item>Single-line item</mdc-list-item>
Expand All @@ -118,9 +112,6 @@ <h3 class="demo-content__headline">Two-Line</h3>
<button mdc-button (click)="twoline.singleSelection = !twoline.singleSelection">Single
Selection:
{{twoline.singleSelection ? 'On' : 'Off'}}</button>
<button mdc-button (click)="twoline.interactive = !twoline.interactive">Interactive:
{{twoline.interactive ? 'On' :
'Off'}}</button>
</div>
<mdc-list #twoline twoLine>
<mdc-list-item>
Expand All @@ -147,8 +138,6 @@ <h3 class="demo-content__headline">Leading Icon</h3>
<button mdc-button (click)="startgraphic.singleSelection = !startgraphic.singleSelection">Single
Selection:
{{startgraphic.singleSelection ? 'On' : 'Off'}}</button>
<button mdc-button (click)="startgraphic.interactive = !startgraphic.interactive">Interactive:
{{startgraphic.interactive ? 'On' : 'Off'}}</button>
</div>
<mdc-list #startgraphic>
<mdc-list-item>
Expand All @@ -171,9 +160,6 @@ <h3 class="demo-content__headline">Trailing Icon</h3>
{{endmeta.border ? 'On' : 'Off'}}</button>
<button mdc-button (click)="endmeta.dense = !endmeta.dense">Dense:
{{endmeta.dense ? 'On' : 'Off'}}</button>
<button mdc-button (click)="endmeta.interactive = !endmeta.interactive">Interactive:
{{endmeta.interactive ? 'On' :
'Off'}}</button>
</div>
<mdc-list #endmeta>
<mdc-list-item>Wi-Fi
Expand All @@ -196,9 +182,6 @@ <h3 class="demo-content__headline">Leading and Trailing Icon</h3>
{{startend.border ? 'On' : 'Off'}}</button>
<button mdc-button (click)="startend.dense = !startend.dense">Dense:
{{startend.dense ? 'On' : 'Off'}}</button>
<button mdc-button (click)="startend.interactive = !startend.interactive">Interactive:
{{startend.interactive ?
'On' : 'Off'}}</button>
</div>
<mdc-list #startend>
<mdc-list-item>
Expand Down Expand Up @@ -266,9 +249,6 @@ <h3 class="demo-content__headline">List with Trailing Checkbox</h3>
{{checkboxes.border ? 'On' : 'Off'}}</button>
<button mdc-button (click)="checkboxes.dense = !checkboxes.dense">Dense:
{{checkboxes.dense ? 'On' : 'Off'}}</button>
<button mdc-button (click)="checkboxes.interactive = !checkboxes.interactive">Interactive:
{{checkboxes.interactive
? 'On' : 'Off'}}</button>
</div>
<mdc-list #checkboxes>
<mdc-list-item>
Expand Down
1 change: 0 additions & 1 deletion demos/src/app/components/list/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export class Api implements OnInit {
{name: 'avatar: boolean', summary: `Configures the leading tiles of each row to display images instead of icons. This will make the graphics of the list items larger.`},
{name: 'border: boolean', summary: `Sets a border around each list item.`},
{name: 'singleSelection: boolean', summary: `When enabled, the space and enter keys (or click event) will trigger an single list item to become selected and any other previous selected element to become deselected.`},
{name: 'interactive: boolean', summary: `List items receive styles for hover, focus, and press states (including the ripple). Default is true.`},
{name: 'useActivatedClass: boolean', summary: `Sets the selection logic to apply/remove the mdc-list-item--activated class.`},
{name: 'useSelectedClass: boolean', summary: `Sets the selection logic to apply/remove the mdc-list-item--selected class.`},
{name: 'wrapFocus: boolean', summary: `Sets the list to allow the up arrow on the first element to focus the last element of the list and vice versa.`},
Expand Down
13 changes: 0 additions & 13 deletions packages/list/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export class MdcListGroupSubheader {
'[class.mdc-list--dense]': 'dense',
'[class.mdc-list--avatar-list]': 'avatar',
'[class.ngx-mdc-list--border]': 'border',
'[class.mdc-list--non-interactive]': '!interactive',
'[class.mdc-list--two-line]': 'twoLine',
'(click)': '_handleClickEvent($event)',
'(keydown)': '_onKeydown($event)',
Expand Down Expand Up @@ -123,18 +122,6 @@ export class MdcList extends MDCComponent<any> implements AfterViewInit, OnDestr
}
private _avatar = false;

@Input()
get interactive(): boolean {
return this._interactive;
}
set interactive(value: boolean) {
const newValue = coerceBooleanProperty(value);
if (newValue !== this._interactive) {
this._interactive = newValue;
}
}
private _interactive = true;

@Input()
get disableRipple(): boolean {
return this._disableRipple;
Expand Down