mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-31 05:06:38 +00:00
Data table display fixes (#5415)
This commit is contained in:
parent
4c4549eb37
commit
9e2606f1c8
@ -27,7 +27,7 @@ class SearchInput extends LitElement {
|
|||||||
protected render(): TemplateResult {
|
protected render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
<style>
|
<style>
|
||||||
.no-underline {
|
.no-underline:not(.focused) {
|
||||||
--paper-input-container-underline: {
|
--paper-input-container-underline: {
|
||||||
display: none;
|
display: none;
|
||||||
height: 0;
|
height: 0;
|
||||||
|
@ -95,6 +95,8 @@ export class HaTabsSubpageDataTable extends LitElement {
|
|||||||
<slot name="header">
|
<slot name="header">
|
||||||
<div class="search-toolbar">
|
<div class="search-toolbar">
|
||||||
<search-input
|
<search-input
|
||||||
|
.filter=${this.filter}
|
||||||
|
class="header"
|
||||||
no-label-float
|
no-label-float
|
||||||
no-underline
|
no-underline
|
||||||
@value-changed=${this._handleSearchChange}
|
@value-changed=${this._handleSearchChange}
|
||||||
@ -119,6 +121,7 @@ export class HaTabsSubpageDataTable extends LitElement {
|
|||||||
<slot name="header">
|
<slot name="header">
|
||||||
<div class="table-header">
|
<div class="table-header">
|
||||||
<search-input
|
<search-input
|
||||||
|
.filter=${this.filter}
|
||||||
no-label-float
|
no-label-float
|
||||||
no-underline
|
no-underline
|
||||||
@value-changed=${this._handleSearchChange}
|
@value-changed=${this._handleSearchChange}
|
||||||
@ -153,13 +156,16 @@ export class HaTabsSubpageDataTable extends LitElement {
|
|||||||
border-bottom: 1px solid rgba(var(--rgb-primary-text-color), 0.12);
|
border-bottom: 1px solid rgba(var(--rgb-primary-text-color), 0.12);
|
||||||
}
|
}
|
||||||
.search-toolbar {
|
.search-toolbar {
|
||||||
margin-left: -24px;
|
|
||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
}
|
}
|
||||||
search-input {
|
search-input {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 2px;
|
top: 2px;
|
||||||
}
|
}
|
||||||
|
search-input.header {
|
||||||
|
left: -8px;
|
||||||
|
top: -7px;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ class HassTabsSubpage extends LitElement {
|
|||||||
></ha-paper-icon-button-arrow-prev>
|
></ha-paper-icon-button-arrow-prev>
|
||||||
${this.narrow
|
${this.narrow
|
||||||
? html`
|
? html`
|
||||||
<div main-title><slot name="header"></slot></div>
|
<div class="main-title"><slot name="header"></slot></div>
|
||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
${tabs.length > 1 || !this.narrow
|
${tabs.length > 1 || !this.narrow
|
||||||
@ -228,14 +228,17 @@ class HassTabsSubpage extends LitElement {
|
|||||||
ha-menu-button,
|
ha-menu-button,
|
||||||
ha-paper-icon-button-arrow-prev,
|
ha-paper-icon-button-arrow-prev,
|
||||||
::slotted([slot="toolbar-icon"]) {
|
::slotted([slot="toolbar-icon"]) {
|
||||||
|
flex-shrink: 0;
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
color: var(--sidebar-icon-color);
|
color: var(--sidebar-icon-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
[main-title] {
|
.main-title {
|
||||||
margin: 0 0 0 24px;
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
max-height: 40px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
flex-grow: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
@ -247,11 +250,6 @@ class HassTabsSubpage extends LitElement {
|
|||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
|
|
||||||
#toolbar-icon {
|
|
||||||
position: absolute;
|
|
||||||
right: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:host([narrow]) .content {
|
:host([narrow]) .content {
|
||||||
height: calc(100% - 128px);
|
height: calc(100% - 128px);
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
|||||||
type: "icon",
|
type: "icon",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "55px",
|
width: "68px",
|
||||||
template: (_status, entity: any) =>
|
template: (_status, entity: any) =>
|
||||||
entity.unavailable || entity.disabled_by || entity.readonly
|
entity.unavailable || entity.disabled_by || entity.readonly
|
||||||
? html`
|
? html`
|
||||||
@ -169,7 +169,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
|||||||
),
|
),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "20%",
|
width: "25%",
|
||||||
};
|
};
|
||||||
columns.platform = {
|
columns.platform = {
|
||||||
title: this.hass.localize(
|
title: this.hass.localize(
|
||||||
|
@ -104,7 +104,7 @@ export class HaConfigLovelaceDashboards extends LitElement {
|
|||||||
),
|
),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "15%",
|
width: "20%",
|
||||||
template: (mode) =>
|
template: (mode) =>
|
||||||
html`
|
html`
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
@ -143,7 +143,7 @@ export class HaConfigLovelaceDashboards extends LitElement {
|
|||||||
"ui.panel.config.lovelace.dashboards.picker.headers.sidebar"
|
"ui.panel.config.lovelace.dashboards.picker.headers.sidebar"
|
||||||
),
|
),
|
||||||
type: "icon",
|
type: "icon",
|
||||||
width: "100px",
|
width: "121px",
|
||||||
template: (sidebar) =>
|
template: (sidebar) =>
|
||||||
sidebar
|
sidebar
|
||||||
? html`
|
? html`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user