mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-05 15:29:50 +00:00
reload masonry when dom is updated
This commit is contained in:
parent
ae2265df21
commit
2af9ff7d00
@ -64,7 +64,8 @@ export default {
|
||||
counterClass: {
|
||||
counter: true //hack to pass class 'counter' in i18n-t
|
||||
},
|
||||
dashboardItems: []
|
||||
dashboardItems: [],
|
||||
masonry: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -75,7 +76,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
const elem = document.querySelector('#dashboards');
|
||||
const masonry = new Masonry(elem, {});
|
||||
this.masonry = new Masonry(elem, {});
|
||||
//Fetch the dashboard items configured for user. Currently response is still hardcoded
|
||||
makeFetch('GET', '/api/1.0/main/dashboard-config-item.json')
|
||||
.then((response) => {
|
||||
@ -84,8 +85,13 @@ export default {
|
||||
})
|
||||
.catch((error) => {
|
||||
throw error
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
updated() {
|
||||
this.masonry.layout();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user