diff --git a/src/Mimisbrunnr.Web.Host/ClientApp/src/components/spaceDirectory/SpaceListItem.vue b/src/Mimisbrunnr.Web.Host/ClientApp/src/components/spaceDirectory/SpaceListItem.vue
index 3313bf4..2617900 100644
--- a/src/Mimisbrunnr.Web.Host/ClientApp/src/components/spaceDirectory/SpaceListItem.vue
+++ b/src/Mimisbrunnr.Web.Host/ClientApp/src/components/spaceDirectory/SpaceListItem.vue
@@ -9,7 +9,7 @@
>
{{ space.name }}
-
+
@@ -26,6 +26,7 @@ export default {
name: "SpaceListItem",
props: {
space: Object,
+ callBack: Function
},
data() {
return {
@@ -50,11 +51,15 @@ export default {
await FavoriteService.addSpace(this.space.key);
}
this.inFavorite = !this.inFavorite;
+ if (this.callBack)
+ this.callBack();
},
unStar: async function () {
var favorite = await FavoriteService.getSpace(this.space.key);
if (favorite == null) return;
await FavoriteService.delete(favorite.id);
+ if (this.callBack)
+ this.callBack();
},
},
created: async function () {
diff --git a/src/Mimisbrunnr.Web.Host/ClientApp/src/views/SpaceDirectory.vue b/src/Mimisbrunnr.Web.Host/ClientApp/src/views/SpaceDirectory.vue
index f8e68b4..1079b51 100644
--- a/src/Mimisbrunnr.Web.Host/ClientApp/src/views/SpaceDirectory.vue
+++ b/src/Mimisbrunnr.Web.Host/ClientApp/src/views/SpaceDirectory.vue
@@ -37,6 +37,7 @@
v-for="space in spaces"
:key="space.key"
:space="space"
+ :callBack="loadFavorites"
button
/>