diff --git a/components/input/demo/allow-clear.ts b/components/input/demo/allow-clear.ts index 9c5d8ba2bb5..9655b2a20d9 100644 --- a/components/input/demo/allow-clear.ts +++ b/components/input/demo/allow-clear.ts @@ -3,14 +3,30 @@ import { Component } from '@angular/core'; @Component({ selector: 'nz-demo-input-allow-clear', template: ` - + - +
+
+ + + + ` }) export class NzDemoInputAllowClearComponent { inputValue: string | null; + textValue: string | null; } diff --git a/components/input/input.directive.ts b/components/input/input.directive.ts index c75dcf49d03..453af2c7a69 100644 --- a/components/input/input.directive.ts +++ b/components/input/input.directive.ts @@ -10,7 +10,7 @@ import { Directive, ElementRef, Input, Renderer2 } from '@angular/core'; import { InputBoolean, NzSizeLDSType } from 'ng-zorro-antd/core'; @Directive({ - selector: '[nz-input]', + selector: 'input[nz-input],textarea[nz-input]', exportAs: 'nzInput', host: { '[class.ant-input-disabled]': 'disabled',