Skip to content

Commit

Permalink
fix: only sort if persisted unless it is display name
Browse files Browse the repository at this point in the history
  • Loading branch information
flaminic committed Dec 17, 2024
1 parent 21e73b8 commit 5900204
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/sectionList/useSectionListSortOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ export const isValidSortPathForSchema = (schema: Schema, path: string) => {
const schemaProperty = getSchemaPropertyForPath(schema, path)

// sorting for metadata-API only works on simple and persisted properties
if (schemaProperty && schemaProperty.simple) {
if (schemaProperty && schemaProperty.simple && schemaProperty.persisted) {
return true
}
if (schemaProperty?.name === 'displayName') {
return true
}
return false
Expand Down

0 comments on commit 5900204

Please sign in to comment.