mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Update url on tab reorder (#18169)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
095d171a61
commit
479a625662
@ -844,6 +844,9 @@ class HUIRoot extends LitElement {
|
||||
const oldIndex = this._curView as number;
|
||||
const newIndex = (this._curView as number) - 1;
|
||||
this._curView = newIndex;
|
||||
if (!this.config.views[oldIndex].path) {
|
||||
this._navigateToView(newIndex, true);
|
||||
}
|
||||
lovelace.saveConfig(swapView(lovelace.config, oldIndex, newIndex));
|
||||
}
|
||||
|
||||
@ -856,6 +859,9 @@ class HUIRoot extends LitElement {
|
||||
const oldIndex = this._curView as number;
|
||||
const newIndex = (this._curView as number) + 1;
|
||||
this._curView = newIndex;
|
||||
if (!this.config.views[oldIndex].path) {
|
||||
this._navigateToView(newIndex, true);
|
||||
}
|
||||
lovelace.saveConfig(swapView(lovelace.config, oldIndex, newIndex));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user