Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select placeholder not work in form #413

Closed
leeziiAtCn opened this issue Oct 9, 2017 · 8 comments · Fixed by #703
Closed

select placeholder not work in form #413

leeziiAtCn opened this issue Oct 9, 2017 · 8 comments · Fixed by #703

Comments

@leeziiAtCn
Copy link

my component.ts

import {FormBuilder, FormGroup} from '@angular/forms'

@Component({
  selector: 'app-test',
  templateUrl: './test.component.html',
  styleUrls: ['./test.component.scss'],
})
export class TestComponent implements OnInit {
  validateForm: FormGroup

  constructor(private fb: FormBuilder) {
  }

  ngOnInit() {
    this.validateForm = this.fb.group({
      select: [null],
    })
  }
}

my template

<form nz-form [nzType]="'horizontal'" [formGroup]="validateForm">
  <div nz-form-item nz-row>
    <div nz-form-label nz-col [nzSpan]="6">
      <label nz-form-item-required>Select</label>
    </div>
    <div nz-form-control nz-col [nzSpan]="14">
      <nz-select formControlName="select" [nzSize]="'large'" [nzPlaceHolder]="'xx'">
        <nz-option [nzLabel]="'China'" [nzValue]="'China'"></nz-option>
        <nz-option [nzLabel]="'U.S.A'" [nzValue]="'U.S.A'"></nz-option>
      </nz-select>
    </div>
  </div>

</form>

I get this
wx20171009-134644

this select placeholder 'xx' is not work

@vthinkxie
Copy link
Member

nzShowSearch = true

@leeziiAtCn
Copy link
Author

反人类啊老铁,为啥这么设计啊

@vthinkxie
Copy link
Member

if there is no search input, there will be no place for placeholder.

@fsneak
Copy link

fsneak commented Nov 7, 2017

Please add this information into official documents.
https://ng.ant.design/#/components/select

@vthinkxie
Copy link
Member

Hi all, this feature will be supported in next version.

@vlados
Copy link

vlados commented Jul 2, 2018

@leeziiAtCn I am seeing that you include sass into the component but the ng-zorro-antd is based on less. Is it a typo or you made it ?

@vthinkxie
Copy link
Member

@vlados angular cli support using both sass and less in one project.

@lock
Copy link

lock bot commented Jul 3, 2019

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 3, 2019
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants