-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Description
Bug, feature request, or proposal:
Bug
Expected
The autocomplete panel does not change its width when the input resizes, only when the input container does.
Current
The autocomplete panel resizes when an mdSuffix is rendered, thus changing the size of the actual input.
Reproduction
https://plnkr.co/edit/VrcrcUBKbwuoOoxc8byM?p=preview
Motivation
Using a "clear input" button on an autocomplete input
Proposed change
/** Returns the width of the input element, so the panel width can match it. */
private _getHostWidth(): number {
- return this._element.nativeElement.getBoundingClientRect().width;
+ return this._inputContainer
+ ? this._inputContainer._elementRef.nativeElement.getBoundingClientRect().width
+ : this._element.nativeElement.getBoundingClientRect().width;
}Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgent