From 7dd7f31cdd53cd5035f8d2e4680d02fa886649e9 Mon Sep 17 00:00:00 2001 From: jimtng <2554958+jimtng@users.noreply.github.com> Date: Mon, 20 Jan 2025 04:04:45 +1000 Subject: [PATCH] Item Add: Navigate to the new Item once added (#3010) Currently, if you go to Settings -> Items -> Add -> Save, you'll be brought back to the Items list (back navigation). This PR changes this behavior so that after the new item is saved/added, the user is redirected to the Item Details page **of that new item**, so they can immediately work on it. Signed-off-by: Jimmy Tanagra --- .../web/src/pages/settings/items/item-edit.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.ui/web/src/pages/settings/items/item-edit.vue b/bundles/org.openhab.ui/web/src/pages/settings/items/item-edit.vue index 6005621692..cdcbfdbfe0 100644 --- a/bundles/org.openhab.ui/web/src/pages/settings/items/item-edit.vue +++ b/bundles/org.openhab.ui/web/src/pages/settings/items/item-edit.vue @@ -217,7 +217,11 @@ export default { } this.dirty = false - this.$f7router.back() + if (this.createMode) { + this.$f7router.navigate('/settings/items/' + this.item.name) + } else { + this.$f7router.back() + } }).catch((err) => { this.$f7.toast.create({ text: 'Item not saved: ' + err,