Skip to content

Commit

Permalink
🔥 Remove specific field for orderings #2615 (#2617)
Browse files Browse the repository at this point in the history
  • Loading branch information
millianapia authored Nov 5, 2024
1 parent 4775d89 commit 5f3e2c9
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 @@ -90,9 +90,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 5f3e2c9

Please sign in to comment.