Skip to content

Commit 82159e3

Browse files
authored
fix(module:select): input field length restricted to 82px (#7626)
Signed-off-by: LemniscateX <1311331039@qq.com> Signed-off-by: LemniscateX <1311331039@qq.com>
1 parent 966dc8f commit 82159e3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎components/select/select-search.component.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export class NzSelectSearchComponent implements AfterViewInit, OnChanges {
7979
const hostDOM = this.elementRef.nativeElement;
8080
const inputDOM = this.inputElement.nativeElement;
8181
this.renderer.removeStyle(hostDOM, 'width');
82-
mirrorDOM.innerHTML = this.renderer.createText(`${inputDOM.value}&nbsp;`);
82+
this.renderer.setProperty(mirrorDOM, 'textContent', `${inputDOM.value}\u00a0`);
8383
this.renderer.setStyle(hostDOM, 'width', `${mirrorDOM.scrollWidth}px`);
8484
}
8585

0 commit comments

Comments
 (0)