mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 03:06:41 +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) {
|
private async _filterChanged(e) {
|
||||||
this.filter = e.detail.value;
|
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) {
|
private async _handlerPicked(ev) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user