Skip to content

Commit

Permalink
feat(list): add nonInteractive property to mdcList
Browse files Browse the repository at this point in the history
  • Loading branch information
gjdev committed May 22, 2018
1 parent 4714dde commit 112d4d7
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions bundle/src/components/list/mdc.list.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ export class MdcListDirective implements AfterContentInit {
_hidden = false;
private _dense = false;
private _avatar = false;
private _nonInteractive = false;

constructor(public _elm: ElementRef) {}

Expand Down Expand Up @@ -260,6 +261,19 @@ export class MdcListDirective implements AfterContentInit {
this._dense = asBoolean(val);
}

/**
* When this input is defined and does not have value false, interactivity affordances for
* the list will be disabled.
*/
@Input() @HostBinding('class.mdc-list--non-interactive')
get nonInteractive() {
return this._nonInteractive;
}

set nonInteractive(val: any) {
this._nonInteractive = asBoolean(val);
}

/**
* When this input is defined and does not have value false, elements with directive <code>mdcListItemGraphic</code>
* will be styled for avatars: large, circular elements that lend themselves well to contact images, profile pictures, etc.
Expand All @@ -275,7 +289,7 @@ export class MdcListDirective implements AfterContentInit {
}

/**
* Directive for a header inside a list group (<code>MdcListGroupDirective</code>) directive.
* Directive for a header inside a list group (<code>mdcListGroup</code>) directive.
*/
@Directive({
selector: '[mdcListGroupSubHeader]'
Expand All @@ -289,7 +303,7 @@ export class MdcListGroupSubHeaderDirective {

/**
* Directive for a material designed list group, grouping several
* <code>MdcListDirective</code> lists.
* <code>mdcList</code> lists.
* List groups should contain elements with <code>mdcListGroupSubHeader</code>,
* and <code>mdcList</code> directives.
*/
Expand Down

0 comments on commit 112d4d7

Please sign in to comment.