diff --git a/src/components/hubl-reactivity.js b/src/components/hubl-reactivity.js index 2dc766c..400a4e2 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) {