mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Fix unhiding default hidden column (#21358)
the first commit is the right commit...
This commit is contained in:
parent
f2993602f9
commit
5ead5ed058
@ -236,14 +236,18 @@ export class DialogDataTableSettings extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
columns.forEach((col) => {
|
columns.forEach((col) => {
|
||||||
if (col.key !== column && !newOrder.includes(col.key)) {
|
if (!newOrder.includes(col.key)) {
|
||||||
if (col.moveable === false) {
|
if (col.moveable === false) {
|
||||||
newOrder.unshift(col.key);
|
newOrder.unshift(col.key);
|
||||||
} else {
|
} else {
|
||||||
newOrder.splice(lastMoveable + 1, 0, col.key);
|
newOrder.splice(lastMoveable + 1, 0, col.key);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (col.defaultHidden && !hidden.includes(col.key)) {
|
if (
|
||||||
|
col.key !== column &&
|
||||||
|
col.defaultHidden &&
|
||||||
|
!hidden.includes(col.key)
|
||||||
|
) {
|
||||||
hidden.push(col.key);
|
hidden.push(col.key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user