Scroll device list when goes out of screen. Fixes #3343

This commit is contained in:
Paulus Schoutsen 2019-07-16 21:39:38 -07:00
parent eaaeb10c6d
commit 55aa5a0d12

View File

@ -69,9 +69,10 @@ class StepFlowCreateEntry extends LitElement {
(device) => (device) =>
html` html`
<div class="device"> <div class="device">
<div>
<b>${device.name}</b><br /> <b>${device.name}</b><br />
${device.model} (${device.manufacturer}) ${device.model} (${device.manufacturer})
</div>
<paper-dropdown-menu-light <paper-dropdown-menu-light
label="Area" label="Area"
.device=${device.id} .device=${device.id}
@ -157,6 +158,8 @@ class StepFlowCreateEntry extends LitElement {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin: -4px; margin: -4px;
max-height: 600px;
overflow-y: auto;
} }
.device { .device {
border: 1px solid var(--divider-color); border: 1px solid var(--divider-color);
@ -178,7 +181,7 @@ class StepFlowCreateEntry extends LitElement {
} }
@media all and (max-width: 450px), all and (max-height: 500px) { @media all and (max-width: 450px), all and (max-height: 500px) {
.device { .device {
width: auto; width: 100%;
} }
} }
`, `,