Skip to content

Commit

Permalink
fix(module:select): input field length restricted to 82px (#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 committed Sep 27, 2022
1 parent 966dc8f commit 82159e3
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 82159e3

Please sign in to comment.