Skip to content

Commit 77effc4

Browse files
committed
Merge branch 'master' of github.com:chamilo/chamilo-lms
2 parents f132c2a + 2dbda0a commit 77effc4

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

assets/vue/views/course/CatalogueCourses.vue

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
:allowTitle="courseCatalogueSettings.filters?.by_title ?? true"
5252
:fields="extraFields"
5353
@apply="onAdvancedApply"
54-
@clear="onAdvancedClear"
5554
/>
5655
</div>
5756

@@ -194,9 +193,14 @@ const loadExtraFields = async () => {
194193
195194
let loadParams = {
196195
itemsPerPage: "12",
196+
order: { [sortField.value]: "asc" },
197197
}
198198
199199
const load = async () => {
200+
if (0 === Object.entries(loadParams).length) {
201+
return
202+
}
203+
200204
status.value = true
201205
202206
try {
@@ -287,7 +291,10 @@ const showAdvancedSearch = ref(false)
287291
const advancedFormKey = ref(0)
288292
289293
function onAdvancedApply(payload) {
290-
loadParams = {}
294+
loadParams = {
295+
itemsPerPage: "12",
296+
order: { [sortField.value]: "asc" },
297+
}
291298
292299
if (payload.title) {
293300
loadParams.title = payload.title
@@ -303,10 +310,6 @@ function onAdvancedApply(payload) {
303310
load()
304311
}
305312
306-
function onAdvancedClear() {
307-
loadParams = {}
308-
}
309-
310313
const visibleCoursesBase = computed(() => {
311314
const sortOpt = allSortOptions.value.find((opt) => opt.value === sortField.value)
312315

0 commit comments

Comments
 (0)