Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Sort Food by Label on Data Management Page #4631

Merged

Conversation

michael-genson
Copy link
Collaborator

What type of PR is this?

(REQUIRED)

  • bug

What this PR does / why we need it:

(REQUIRED)

Fixes sorting by label on the food data management page. It used to sort in an arbitrary order (I think it would sort by boolean value of whether the label was assigned or not, then by id). Now it sorts by label name as expected.

Foods missing labels will appear first (since they are coalesced to having a label of ""). As noted above this was already the case, but now it's actually explicitly supported rather than being a consequence of whatever logic the data table uses to sort.

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #4630

@Kuchenpirat Kuchenpirat enabled auto-merge (squash) December 10, 2024 13:59
@Kuchenpirat Kuchenpirat merged commit 02a545d into mealie-recipes:mealie-next Dec 10, 2024
13 checks passed
@michael-genson michael-genson deleted the fix/sort-food-by-label branch December 10, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] - Sorting food data by label does not sort by label name
2 participants