diff --git a/src/dialogs/config-flow/step-flow-pick-handler.ts b/src/dialogs/config-flow/step-flow-pick-handler.ts
index 38257e66aa22..66d97002938d 100644
--- a/src/dialogs/config-flow/step-flow-pick-handler.ts
+++ b/src/dialogs/config-flow/step-flow-pick-handler.ts
@@ -1,5 +1,3 @@
-import "@polymer/paper-item/paper-icon-item";
-import "@polymer/paper-item/paper-item-body";
import Fuse from "fuse.js";
import {
css,
@@ -22,6 +20,7 @@ import { HomeAssistant } from "../../types";
import { brandsUrl } from "../../util/brands-url";
import { documentationUrl } from "../../util/documentation-url";
import { configFlowContentStyles } from "./styles";
+import "@material/mwc-list/mwc-list-item";
interface HandlerObj {
name: string;
@@ -97,12 +96,14 @@ class StepFlowPickHandler extends LitElement {
? handlers.map(
(handler: HandlerObj) =>
html`
-
- ${handler.name}
-
-
+ ${handler.name}
+
+
`
)
: html`
@@ -145,10 +146,26 @@ class StepFlowPickHandler extends LitElement {
}
public willUpdate(changedProps: PropertyValues): void {
+ super.willUpdate(changedProps);
if (this._filter === undefined && this.initialFilter !== undefined) {
this._filter = this.initialFilter;
}
- super.willUpdate(changedProps);
+ if (this.initialFilter !== undefined && this._filter === "") {
+ this.initialFilter = undefined;
+ this._filter = "";
+ this._width = undefined;
+ this._height = undefined;
+ } else if (
+ this.hasUpdated &&
+ changedProps.has("_filter") &&
+ (!this._width || !this._height)
+ ) {
+ // Store the width and height so that when we search, box doesn't jump
+ const boundingRect =
+ this.shadowRoot!.querySelector("div")!.getBoundingClientRect();
+ this._width = boundingRect.width;
+ this._height = boundingRect.height;
+ }
}
protected firstUpdated(changedProps) {
@@ -159,24 +176,6 @@ class StepFlowPickHandler extends LitElement {
);
}
- protected updated(changedProps) {
- super.updated(changedProps);
- // Store the width and height so that when we search, box doesn't jump
- const div = this.shadowRoot!.querySelector("div")!;
- if (!this._width) {
- const width = div.clientWidth;
- if (width) {
- this._width = width;
- }
- }
- if (!this._height) {
- const height = div.clientHeight;
- if (height) {
- this._height = height;
- }
- }
- }
-
private _getHandlers() {
return this._filterHandlers(
this.handlers,
@@ -219,7 +218,7 @@ class StepFlowPickHandler extends LitElement {
}
search-input {
display: block;
- margin: -12px 16px 0;
+ margin: 8px 16px 0;
}
ha-icon-next {
margin-right: 8px;
@@ -236,10 +235,6 @@ class StepFlowPickHandler extends LitElement {
max-height: calc(100vh - 134px);
}
}
- paper-icon-item {
- cursor: pointer;
- margin-bottom: 4px;
- }
p {
text-align: center;
padding: 16px;
diff --git a/src/dialogs/more-info/ha-more-info-dialog.ts b/src/dialogs/more-info/ha-more-info-dialog.ts
index dd339585849f..c1de09d4f700 100644
--- a/src/dialogs/more-info/ha-more-info-dialog.ts
+++ b/src/dialogs/more-info/ha-more-info-dialog.ts
@@ -352,6 +352,10 @@ export class MoreInfoDialog extends LitElement {
var(--mdc-dialog-scroll-divider-color, rgba(0, 0, 0, 0.12));
}
+ .content {
+ outline: none;
+ }
+
@media all and (min-width: 451px) and (min-height: 501px) {
ha-dialog {
--mdc-dialog-max-width: 90vw;