From 112d4d7ce9e6d5e3dbd21ec6ae6e034070c6fe59 Mon Sep 17 00:00:00 2001 From: gjdev Date: Tue, 22 May 2018 08:52:50 +0200 Subject: [PATCH] feat(list): add nonInteractive property to mdcList --- .../src/components/list/mdc.list.directive.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/bundle/src/components/list/mdc.list.directive.ts b/bundle/src/components/list/mdc.list.directive.ts index 7165afa..8fa4fac 100644 --- a/bundle/src/components/list/mdc.list.directive.ts +++ b/bundle/src/components/list/mdc.list.directive.ts @@ -209,6 +209,7 @@ export class MdcListDirective implements AfterContentInit { _hidden = false; private _dense = false; private _avatar = false; + private _nonInteractive = false; constructor(public _elm: ElementRef) {} @@ -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 mdcListItemGraphic * will be styled for avatars: large, circular elements that lend themselves well to contact images, profile pictures, etc. @@ -275,7 +289,7 @@ export class MdcListDirective implements AfterContentInit { } /** - * Directive for a header inside a list group (MdcListGroupDirective) directive. + * Directive for a header inside a list group (mdcListGroup) directive. */ @Directive({ selector: '[mdcListGroupSubHeader]' @@ -289,7 +303,7 @@ export class MdcListGroupSubHeaderDirective { /** * Directive for a material designed list group, grouping several - * MdcListDirective lists. + * mdcList lists. * List groups should contain elements with mdcListGroupSubHeader, * and mdcList directives. */