1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-25 08:09:41 +02:00

feat: restore frontend sorting for all recipes (#1497)

* fixed typo

* merged "all recipes" pagination into recipe card
created custom sort card for all recipes
refactored backend calls for all recipes to sort/paginate

* frontend lint fixes

* restored recipes reference

* replaced "this" with reference

* fix linting errors

* re-order context menu

* add todo

Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
This commit is contained in:
Michael Genson 2022-07-26 21:08:56 -05:00 committed by GitHub
parent 703ee32653
commit 07fef8af9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 211 additions and 53 deletions

View file

@ -63,11 +63,7 @@ export const useLazyRecipes = function () {
async function fetchMore(page: number, perPage: number, orderBy: string | null = null, orderDirection = "desc") {
const { data } = await api.recipes.getAll(page, perPage, { orderBy, orderDirection });
if (data) {
data.items.forEach((recipe) => {
recipes.value?.push(recipe);
});
}
return data ? data.items : [];
}
return {