File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
195194let loadParams = {
196195 itemsPerPage: " 12" ,
196+ order: { [sortField .value ]: " asc" },
197197}
198198
199199const 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)
287291const advancedFormKey = ref (0 )
288292
289293function 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-
310313const visibleCoursesBase = computed (() => {
311314 const sortOpt = allSortOptions .value .find ((opt ) => opt .value === sortField .value )
312315
You can’t perform that action at this time.
0 commit comments