From b6278ca2915cdae4e9c49f436cbc5aeb5aeab047 Mon Sep 17 00:00:00 2001 From: Tobias Klika Date: Fri, 18 Sep 2020 14:04:48 +0200 Subject: [PATCH] push active-id to tree-items for highlighting --- zero.Web.UI/App/components/tree/tree-item.vue | 6 +++++- zero.Web.UI/App/components/tree/tree.vue | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/zero.Web.UI/App/components/tree/tree-item.vue b/zero.Web.UI/App/components/tree/tree-item.vue index cab36bc7..1156e172 100644 --- a/zero.Web.UI/App/components/tree/tree-item.vue +++ b/zero.Web.UI/App/components/tree/tree-item.vue @@ -23,6 +23,10 @@ value: { type: Object, required: true + }, + activeId: { + type: String, + default: null } }, @@ -59,7 +63,7 @@ 'is-open': item.isOpen, 'is-selected': item.isSelected, 'is-disabled': item.disabled, - 'is-active': this.isLink && (item.id == this.$route.params.id || (item.url && !item.url.params && item.url.name === this.$route.name)) + 'is-active': this.isLink && ((!!item.id && item.id === this.activeId) || item.id == this.$route.params.id || (item.url && !item.url.params && item.url.name === this.$route.name)) }; }, diff --git a/zero.Web.UI/App/components/tree/tree.vue b/zero.Web.UI/App/components/tree/tree.vue index f0689dba..6accfca6 100644 --- a/zero.Web.UI/App/components/tree/tree.vue +++ b/zero.Web.UI/App/components/tree/tree.vue @@ -6,7 +6,7 @@