From ba014b0ce533344ab7015245cf4876f1e540ee67 Mon Sep 17 00:00:00 2001 From: lkramarov Date: Wed, 11 Dec 2019 16:50:48 +0300 Subject: [PATCH] =?UTF-8?q?feat(select):=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D1=82=D1=8C=20=D0=BE=D0=BF=D1=86=D0=B8=D1=8E=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D1=81=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D1=8F=20?= =?UTF-8?q?=D1=87=D0=B5=D0=BA=D0=B1=D0=BE=D1=81=D0=BE=D0=B2=20(#UIM-252)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/mosaic-dev/select/template.html | 2 +- packages/mosaic/core/option/option.html | 2 +- packages/mosaic/core/option/option.ts | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/mosaic-dev/select/template.html b/packages/mosaic-dev/select/template.html index 69c5c4cdb..45870d142 100644 --- a/packages/mosaic-dev/select/template.html +++ b/packages/mosaic-dev/select/template.html @@ -67,7 +67,7 @@
Ничего не найдено
- {{ option }} + {{ option }} diff --git a/packages/mosaic/core/option/option.html b/packages/mosaic/core/option/option.html index 3d10ce4e5..4dc715a8c 100644 --- a/packages/mosaic/core/option/option.html +++ b/packages/mosaic/core/option/option.html @@ -1,5 +1,5 @@ diff --git a/packages/mosaic/core/option/option.ts b/packages/mosaic/core/option/option.ts index 6b0456cec..462649e18 100644 --- a/packages/mosaic/core/option/option.ts +++ b/packages/mosaic/core/option/option.ts @@ -75,6 +75,17 @@ export class McOption implements AfterViewChecked, OnDestroy { /** The form value of the option. */ @Input() value: any; + @Input() + get showCheckbox() { + return this._showCheckbox === undefined ? this.multiple : this._showCheckbox; + } + + set showCheckbox(value) { + this._showCheckbox = coerceBooleanProperty(value); + } + + private _showCheckbox: boolean; + /** Event emitted when the option is selected or deselected. */ // tslint:disable-next-line:no-output-on-prefix @Output() readonly onSelectionChange = new EventEmitter();