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: Search sorting #1374

Merged
merged 4 commits into from
Oct 31, 2023
Merged

fix: Search sorting #1374

merged 4 commits into from
Oct 31, 2023

Conversation

ncomerci
Copy link
Contributor

This closes #1354

@ncomerci ncomerci requested a review from andyesp October 27, 2023 17:40
@ncomerci ncomerci requested review from 1emu and andyesp October 27, 2023 19:28
}

export function toSortingOrder<OrElse>(value: string | null | undefined, orElse: () => OrElse) {
return toCustomType<SortingOrder, OrElse, typeof value>(value, isSortingOrder, orElse)
Copy link
Member

@andyesp andyesp Oct 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the orElse callback as I find it confusing to see all those functions returning null/undefined everywhere. I'd change this to a default value argument. But we can discuss this later and change it in another PR.

src/entities/Proposal/types.ts Outdated Show resolved Hide resolved
@andyesp andyesp merged commit 63ec3ad into master Oct 31, 2023
1 check passed
@andyesp andyesp deleted the fix/1354-search-sorting branch October 31, 2023 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Latest / oldest sorting not working properly on proposals search
3 participants