Merge remote-tracking branch 'origin/bugfix/reactivity' into release/core-0.17

This commit is contained in:
Jean-Baptiste Pasquier 2021-05-20 14:33:28 +02:00
commit a18e8758f9
4 changed files with 18 additions and 14 deletions

View File

@ -15,6 +15,9 @@ export const HublReactivity = {
this.subscribe(); this.subscribe();
} }
}, },
refreshData: {
type: String,
},
}, },
async fetchData(value) { async fetchData(value) {
this.resourceId = null; this.resourceId = null;
@ -28,9 +31,10 @@ export const HublReactivity = {
this.subscribe(); this.subscribe();
}, },
subscribe() { subscribe() {
if (this.resourceId && this.targetSrc) { if (this.refreshData === '') { // clears cache and re-fetch data
store.subscribeVirtualContainerTo(this.resourceId, this.targetSrc); store.subscribeVirtualContainerTo(this.resourceId, this.targetSrc);
store.subscribeVirtualContainerTo(this.targetSrc, this.resourceId); } else { // notifies components
store.subscribeResourceTo(this.resourceId, this.targetSrc);
} }
} }
} }

View File

@ -16,8 +16,8 @@ solid-widget(name=`hubl-admin-circle-join-button`)
hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}` target-src='${value}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}` target-src='${value}')
hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}joinable/` target-src='${value}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}joinable/` target-src='${value}')
hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}` target-src='${value}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}` target-src='${value}')
hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}joinable/` target-src='${value}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}joinable/` target-src='${value}' refresh-data)
hubl-reactivity(bind-user nested-field="circles" target-src='${value}') hubl-reactivity(bind-user nested-field="circles" target-src='${value}' refresh-data)
include page-admin-circles.pug include page-admin-circles.pug

View File

@ -3,8 +3,8 @@ solid-widget(name=`leave-circle-reactivity`)
hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}` target-src='${value}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}` target-src='${value}')
hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}joinable/` target-src='${value}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}joinable/` target-src='${value}')
hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}` target-src='${value}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}` target-src='${value}')
hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}joinable/` target-src='${value}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}joinable/` target-src='${value}' refresh-data)
hubl-reactivity(bind-user nested-field="circles" target-src='${value}') hubl-reactivity(bind-user nested-field="circles" target-src='${value}' refresh-data)
solid-widget(name=`hubl-admin-circle-leave-button`) solid-widget(name=`hubl-admin-circle-leave-button`)
template template
@ -17,8 +17,8 @@ solid-widget(name=`hubl-admin-circle-leave-button`)
hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}` target-src='${src}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}` target-src='${src}')
hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}joinable/` target-src='${src}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.get}joinable/` target-src='${src}')
hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}` target-src='${src}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}` target-src='${src}')
hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}joinable/` target-src='${src}') hubl-reactivity(data-src=`${getComponent('circles').endpoints.post}joinable/` target-src='${src}' refresh-data)
hubl-reactivity(bind-user nested-field="circles" target-src='${src}') hubl-reactivity(bind-user nested-field="circles" target-src='${src}' refresh-data)
solid-display( solid-display(
data-src="${src}" data-src="${src}"
fields="circle" fields="circle"

View File

@ -43,8 +43,8 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}` target-src='${value}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}` target-src='${value}')
hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}joinable/` target-src='${value}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}joinable/` target-src='${value}')
hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}` target-src='${value}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}` target-src='${value}')
hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}joinable/` target-src='${value}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}joinable/` target-src='${value}' refresh-data)
hubl-reactivity(bind-user nested-field="projects" target-src='${value}') hubl-reactivity(bind-user nested-field="projects" target-src='${value}' refresh-data)
solid-widget(name=`hubl-admin-project-leave-button`) solid-widget(name=`hubl-admin-project-leave-button`)
template template
@ -57,8 +57,8 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}` target-src='${src}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}` target-src='${src}')
hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}joinable/` target-src='${src}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}joinable/` target-src='${src}')
hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}` target-src='${src}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}` target-src='${src}')
hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}joinable/` target-src='${src}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}joinable/` target-src='${src}' refresh-data)
hubl-reactivity(bind-user nested-field="projects" target-src='${src}') hubl-reactivity(bind-user nested-field="projects" target-src='${src}' refresh-data)
solid-display( solid-display(
data-src="${src}" data-src="${src}"
fields="project" fields="project"
@ -122,8 +122,8 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}` target-src='${value}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}` target-src='${value}')
hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}joinable/` target-src='${value}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.get}joinable/` target-src='${value}')
hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}` target-src='${value}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}` target-src='${value}')
hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}joinable/` target-src='${value}') hubl-reactivity(data-src=`${getComponent('projects').endpoints.post}joinable/` target-src='${value}' refresh-data)
hubl-reactivity(bind-user nested-field="projects" target-src='${value}') hubl-reactivity(bind-user nested-field="projects" target-src='${value}' refresh-data)
solid-display( solid-display(
class='table-body' class='table-body'