Closed smarroufin closed 2 years ago
@farnabaz thank you! i can now sort!!
Thanks for explanation @smarroufin. This is fixed in #1069 and it should works fine in latest version.
Property 'sortBy' does not exist on type 'QueryBuilder
@BroJenuel Yes, you can use sort
to order results. Check out sort docs
@farnabaz thank you! i can now sort!!
thx you for ?
Environment
Darwin
v14.17.0
3.0.0-rc.3
yarn@1.22.10
vite
css
,modules
,build
,runtimeConfig
,strapi
,ui
,tailwindcss
,content
,typescript
@nuxthq/ui@0.0.2-27536218.7275668
,@nuxthq/admin@0.0.1-27531272.b4f169e
,@nuxtjs/strapi@1.3.2-27529127.14eaac5
,@nuxt/content@2.0.0-27536649.61e4b1f
,vue-plausible@1.3.1
-
Reproduction
Let's say we have blog posts with a date in the front matter:
1.article-1.md
2.article-2.md
queryContent('/resources/blog').where({ $not: { slug: { $in: ['/resources/blog'] } } }).sortBy('date', 'desc').find()
Describe the bug
The order should be affected by the
sortBy
. But it isn't.Additional context
No response
Logs
No response