From bbddfce20de0ea9ea495688bb683d5077ad3065d Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Fri, 19 Apr 2024 11:08:34 +0530 Subject: [PATCH 1/2] refactor: add support for new abstractions at the workspace level Co-authored-by: Andrew Bastin Co-authored-by: amk-dev --- src/components/smart/Tree.vue | 4 ++-- src/components/smart/TreeBranch.vue | 6 ++---- src/helpers/treeAdapter.ts | 3 ++- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/components/smart/Tree.vue b/src/components/smart/Tree.vue index a261f84..43fcada 100644 --- a/src/components/smart/Tree.vue +++ b/src/components/smart/Tree.vue @@ -50,7 +50,7 @@ diff --git a/src/components/smart/TreeBranch.vue b/src/components/smart/TreeBranch.vue index 9992a42..ffb23a0 100644 --- a/src/components/smart/TreeBranch.vue +++ b/src/components/smart/TreeBranch.vue @@ -27,7 +27,7 @@ > @@ -114,9 +114,7 @@ const highlightNode = ref(false) /** * Fetch the child nodes from the adapter by passing the node id of the current node */ -const childNodes = computed( - () => props.adapter.getChildren(props.nodeItem.id).value, -) +const childNodes = props.adapter.getChildren(props.nodeItem.id, props.nodeItem.data.type) const toggleNodeChildren = () => { if (!childrenRendered.value) childrenRendered.value = true diff --git a/src/helpers/treeAdapter.ts b/src/helpers/treeAdapter.ts index 98e611c..9a7bf7b 100644 --- a/src/helpers/treeAdapter.ts +++ b/src/helpers/treeAdapter.ts @@ -28,7 +28,8 @@ export interface SmartTreeAdapter { /** * * @param nodeID - id of the node to get children for + * @param nodeType - Type of the node (`collection` | `request`) * @returns - Ref that contains the children of the node. It is reactive and will be updated when the children are changed. */ - getChildren: (nodeID: string | null) => Ref> + getChildren: (nodeID: string | null, nodeType?: string) => Ref> } From 2bd9b88948d595782795f496db19db85b32f8410 Mon Sep 17 00:00:00 2001 From: Anwarul Islam Date: Thu, 23 May 2024 21:47:32 +0600 Subject: [PATCH 2/2] chore: release v0.1.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 32e8d5d..1e572fb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hoppscotch/ui", - "version": "0.1.2", + "version": "0.1.4", "license": "MIT", "description": "Hoppscotch UI", "author": "Hoppscotch (support@hoppscotch.io)",