Skip to content

Commit

Permalink
🔥 Remove specific field for orderings #2615
Browse files Browse the repository at this point in the history
  • Loading branch information
millianapia committed Oct 31, 2024
1 parent ef1ac68 commit d2fab36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions sanityv3/schemas/documents/magazine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@ export default {
{
title: 'Title ',
name: 'titleAsc',
// Yes, this will add a warning in the console, but we still need the [0] since it's a rich text editor
// Might be worth to look into if it is a better way of sorting rich text editors
by: [{ field: 'title[0].children[0].text', direction: 'asc' }],
by: [{ field: 'title', direction: 'asc' }],
},
],
preview: {
Expand Down
4 changes: 1 addition & 3 deletions sanityv3/schemas/documents/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ export default {
{
title: 'Title ',
name: 'titleAsc',
// Yes, this will add a warning in the console, but we still need the [0] since it's a rich text editor
// Might be worth to look into if it is a better way of sorting rich text editors
by: [{ field: 'title[0].children[0].text', direction: 'asc' }],
by: [{ field: 'title', direction: 'asc' }],
},
],
preview: {
Expand Down

0 comments on commit d2fab36

Please sign in to comment.