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

[Input] support allowClear property for textarea #4623

Closed
hsuanxyz opened this issue Dec 31, 2019 · 4 comments
Closed

[Input] support allowClear property for textarea #4623

hsuanxyz opened this issue Dec 31, 2019 · 4 comments

Comments

@hsuanxyz
Copy link
Member

Ref ant-design/ant-design#19310

@DreamPWJ
Copy link
Contributor

DreamPWJ commented Jan 2, 2020

请简化API 和react 一致

@DreamPWJ
Copy link
Contributor

DreamPWJ commented Jan 2, 2020

API太多复杂 ,多个清除input就导致大量的代码

@vthinkxie
Copy link
Member

@DreamPWJ 自己封装一个组件一共7行代码,目前提供给所有用户的就是原子操作,你需要的不是简化API,是封装API

    <nz-input-group [nzSuffix]="suffixTemplate">
      <input type="text" nz-input [(ngModel)]="inputValue" placeholder="input with clear icon" />
    </nz-input-group>
    <ng-template #suffixTemplate
      ><i nz-icon class="ant-input-clear-icon" nzTheme="fill" nzType="close-circle" *ngIf="inputValue" (click)="inputValue = null"></i
    ></ng-template>

Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this issue Apr 9, 2020
@hsuanxyz hsuanxyz mentioned this issue Apr 15, 2020
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
@daniell0gda
Copy link

daniell0gda commented Aug 5, 2020

@vthinkxie
I think this issue should be reopened because of this situation:
image

Icon is now not visible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants