From 354807c512d83dbb207a5456729f9f8ed61ffb84 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Pasquier <contact@jbpasquier.eu>
Date: Wed, 2 Dec 2020 10:35:21 +0100
Subject: [PATCH] fix: no-render

---
 src/components/hubl-reactivity.js | 26 +++++++++++---------------
 1 file changed, 11 insertions(+), 15 deletions(-)

diff --git a/src/components/hubl-reactivity.js b/src/components/hubl-reactivity.js
index 2dc766c2..400a4e2d 100644
--- a/src/components/hubl-reactivity.js
+++ b/src/components/hubl-reactivity.js
@@ -11,21 +11,17 @@ export const HublReactivity = {
         this.subscribe();
       }
     },
-    dataSrc: {
-      type: String,
-      default: '',
-      callback: async function (value) {
-        this.resourceId = null;
-        if (this.nestedField) {
-          const resource = store.get(value) || await store.getData(value, this.context);
-          const nestedResource = await resource[this.nestedField]
-          this.resourceId = nestedResource ? nestedResource['@id'] : null;
-        } else {
-          this.resourceId = value;
-        }
-        this.subscribe();
-      }
-    },
+  },
+  async fetchData(value) {
+    this.resourceId = null;
+    if (this.nestedField) {
+      const resource = store.get(value) || await store.getData(value, this.context);
+      const nestedResource = await resource[this.nestedField]
+      this.resourceId = nestedResource ? nestedResource['@id'] : null;
+    } else {
+      this.resourceId = value;
+    }
+    this.subscribe();
   },
   subscribe() {
     if (this.resourceId && this.targetSrc) {
-- 
GitLab