Skip to content

Case insensitive order by? #634

Answered by CodeDredd
bpuig asked this question in Q&A
Nov 27, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Right now its not possible. But if its ok i am going to include this feature to the sortBy helper because orderBy can by used multiple times with different fields where setting a sorting flag would be confusing.

So i try to implemnt something like this:

const userCollection = useCollect(useRepo(User).make([
    { id: 1, name: 'James', age: 40, post: { id: 1, title: 'Title1' } },
    { id: 2, name: 'john', age: 30, post: { id: 2, title: 'Title2' } },
    { id: 3, name: 'David', age: 20 },
  ])).sortBy('name', 'SORT_FLAG_CASE')

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bpuig
Comment options

Answer selected by bpuig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request
2 participants