Uses fallback paramaters only if no perpage and orderby is passed.
This commit is contained in:
parent
a1baa8b5a9
commit
dcfdfe4ee0
|
@ -78,9 +78,13 @@ const useTainacanStore = defineStore("tainacan", {
|
||||||
|
|
||||||
if (params && params.perPage)
|
if (params && params.perPage)
|
||||||
endpoint += '&perpage=' + params.perPage;
|
endpoint += '&perpage=' + params.perPage;
|
||||||
|
else
|
||||||
|
endpoint += '&perpage=12';
|
||||||
|
|
||||||
if (params && params.orderBy)
|
if (params && params.orderBy)
|
||||||
endpoint += '&orderby=' + params.orderBy;
|
endpoint += '&orderby=' + params.orderBy;
|
||||||
|
else
|
||||||
|
endpoint += '&orderby=modified';
|
||||||
|
|
||||||
if (params.reset) {
|
if (params.reset) {
|
||||||
this.collectionItems = [];
|
this.collectionItems = [];
|
||||||
|
|
Loading…
Reference in New Issue