Skip to content

Commit

Permalink
fix(module:select): input field length restricted to 82px (NG-ZORRO#7626
Browse files Browse the repository at this point in the history
)

Signed-off-by: LemniscateX <1311331039@qq.com>

Signed-off-by: LemniscateX <1311331039@qq.com>
  • Loading branch information
LemniscateX authored and chenc041 committed Dec 14, 2022
1 parent 2bedde6 commit 0ffffeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/select/select-search.component.ts
Expand Up @@ -79,7 +79,7 @@ export class NzSelectSearchComponent implements AfterViewInit, OnChanges {
const hostDOM = this.elementRef.nativeElement;
const inputDOM = this.inputElement.nativeElement;
this.renderer.removeStyle(hostDOM, 'width');
mirrorDOM.innerHTML = this.renderer.createText(`${inputDOM.value}&nbsp;`);
this.renderer.setProperty(mirrorDOM, 'textContent', `${inputDOM.value}\u00a0`);
this.renderer.setStyle(hostDOM, 'width', `${mirrorDOM.scrollWidth}px`);
}

Expand Down

0 comments on commit 0ffffeb

Please sign in to comment.