From a842cddebbb7762b81d39499ec92f2f96f9db61d Mon Sep 17 00:00:00 2001 From: VTHINKXIE Date: Fri, 8 Dec 2017 15:19:32 +0800 Subject: [PATCH] feat(module:select): support placeholder for basic select (#703) close #413 --- src/components/select/nz-select.component.ts | 7 ++++++- .../nz-demo-select/nz-demo-select-basic.component.ts | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/select/nz-select.component.ts b/src/components/select/nz-select.component.ts index 6ea9fe70700..ee8a968502f 100644 --- a/src/components/select/nz-select.component.ts +++ b/src/components/select/nz-select.component.ts @@ -54,6 +54,11 @@ import { NzOptionPipe } from './nz-option.pipe'; (keydown.ArrowUp)="handleKeyUpEvent($event)" (keydown.ArrowDown)="handleKeyDownEvent($event)">
+
+ + {{ nzPlaceHolder }} + +
{{ _selectedOption?.nzLabel }}
@@ -173,7 +178,7 @@ export class NzSelectComponent implements OnInit, AfterContentInit, AfterContent _selectionPrefixCls = `${this._prefixCls}-selection`; _size: string; _value: string[] | string; - _placeholder = 'Placeholder'; + _placeholder = 'placeholder'; _notFoundContent = this._locale.translate('Select.notFoundContent'); _searchText = ''; _triggerWidth = 0; diff --git a/src/showcase/nz-demo-select/nz-demo-select-basic.component.ts b/src/showcase/nz-demo-select/nz-demo-select-basic.component.ts index d586d5e2877..f2f3548a9a9 100644 --- a/src/showcase/nz-demo-select/nz-demo-select-basic.component.ts +++ b/src/showcase/nz-demo-select/nz-demo-select-basic.component.ts @@ -3,7 +3,7 @@ import { Component, OnInit } from '@angular/core'; @Component({ selector: 'nz-demo-select-basic', template: ` - + - +