mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-27 08:14:30 -04: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user