mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-02 20:15:24 +02:00
fix: all-recipes page now sorts alphabetically (#1405)
* added sort params to backend call * hardcoded alphabetical sort param * removed trivial type annotation * linters are friends, not food
This commit is contained in:
parent
d4b92a8ade
commit
bb1fa52d10
2 changed files with 9 additions and 5 deletions
|
@ -61,8 +61,8 @@ export const useLazyRecipes = function () {
|
|||
|
||||
const recipes = ref<Recipe[]>([]);
|
||||
|
||||
async function fetchMore(start: number, limit: number) {
|
||||
const { data } = await api.recipes.getAll(start, limit);
|
||||
async function fetchMore(start: number, limit: number, orderBy: string | null = null, orderDescending = true) {
|
||||
const { data } = await api.recipes.getAll(start, limit, { orderBy, orderDescending });
|
||||
if (data) {
|
||||
data.forEach((recipe) => {
|
||||
recipes.value?.push(recipe);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue