mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 00:07:22 +00:00
Widget scrolling behavior #395
This commit is contained in:
parent
ab8f85510d
commit
e3ce95adca
@ -523,6 +523,8 @@ const WidgetConfigurator = {
|
||||
for (var key in this.customWidget.settings) {
|
||||
this.settings[key] = this.customWidget.settings[key];
|
||||
}
|
||||
|
||||
this.initResizer();
|
||||
});
|
||||
},
|
||||
handleLoading(isLoading) {
|
||||
|
||||
@ -411,6 +411,7 @@ var app = new Vue({
|
||||
this.isLoading = true;
|
||||
|
||||
const params = this.getSearchParams();
|
||||
const needsScrollToTop = this.dates.length > 0;
|
||||
axios
|
||||
.get(`/api/v1/event-dates/search`, { params: params })
|
||||
.then((response) => {
|
||||
@ -419,14 +420,20 @@ var app = new Vue({
|
||||
this.totalRows = response.data.total;
|
||||
this.isLoading = false;
|
||||
this.initialLoaded = true;
|
||||
this.scrollToTop();
|
||||
|
||||
if (needsScrollToTop) {
|
||||
this.scrollToTop();
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
this.isLoading = false;
|
||||
this.dates = [];
|
||||
this.totalRows = 0;
|
||||
this.error = error.message;
|
||||
this.scrollToTop();
|
||||
|
||||
if (needsScrollToTop) {
|
||||
this.scrollToTop();
|
||||
}
|
||||
});
|
||||
},
|
||||
loadCategories() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user