mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
properly store width (#3400)
This commit is contained in:
parent
dcb975c8ce
commit
5ec58a723e
@ -80,13 +80,19 @@ class StepFlowPickHandler extends LitElement {
|
||||
`;
|
||||
}
|
||||
|
||||
protected updated(changedProps) {
|
||||
super.updated(changedProps);
|
||||
// Store the width so that when we search, box doesn't jump
|
||||
if (!this._width) {
|
||||
const width = this.shadowRoot!.querySelector("div")!.clientWidth;
|
||||
if (width) {
|
||||
this._width = width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async _filterChanged(e) {
|
||||
this.filter = e.detail.value;
|
||||
|
||||
// Store the width so that when we search, box doesn't jump
|
||||
if (this._width === undefined) {
|
||||
this._width = this.shadowRoot!.querySelector("div")!.clientWidth;
|
||||
}
|
||||
}
|
||||
|
||||
private async _handlerPicked(ev) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user