From 795c4537b1de81b33b2870ed2dc099e99f3632f5 Mon Sep 17 00:00:00 2001 From: TheDiaval Date: Thu, 1 Aug 2019 09:32:21 +0300 Subject: [PATCH] feature(core): add enabled prop to ellipsis directive --- .../core/src/lib/directives/ellipsis.directive.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/directives/ellipsis.directive.ts b/npm/ng-packs/packages/core/src/lib/directives/ellipsis.directive.ts index b78a97c81c..844f1d9a87 100644 --- a/npm/ng-packs/packages/core/src/lib/directives/ellipsis.directive.ts +++ b/npm/ng-packs/packages/core/src/lib/directives/ellipsis.directive.ts @@ -11,12 +11,17 @@ export class EllipsisDirective implements AfterContentInit { @Input() title: string; - @HostBinding('class.abp-ellipsis') + @Input('abpEllipsisEnabled') enabled = true; + @HostBinding('class.abp-ellipsis') + get class() { + return this.enabled; + } + @HostBinding('style.max-width') get maxWidth() { - return this.witdh || '180px'; + return this.enabled ? this.witdh || '180px' : undefined; } constructor(private cdRef: ChangeDetectorRef, private elRef: ElementRef) {}