Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/search/SortBy.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function SortBy({

const {
defaultSortBy = 'updatedAt',
defaultSortDir = 'desc',
defaultSortDirection = 'desc',
} = sortConfig;

const options = Object.keys(sortConfig)
Expand All @@ -59,7 +59,7 @@ function SortBy({
};
});

const [sortBy, sortDir] = sort?.split(' ') ?? [defaultSortBy, defaultSortDir];
const [sortBy, sortDir] = sort?.split(' ') ?? [defaultSortBy, defaultSortDirection];
const inputId = 'sortBy';
const input = (
<DropdownMenuInput
Expand All @@ -70,7 +70,7 @@ function SortBy({
/>
);

const sortDirLabel = sortDir ? intl.formatMessage(messages.descendingLabel)
const sortDirLabel = sortDir === 'desc' ? intl.formatMessage(messages.descendingLabel)
: intl.formatMessage(messages.ascendingLabel);
const sortDirButton = (
<Button
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/recordTypes/chronology/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export default (configContext) => {
sortBy: 'collectionspace_core:updatedAt',
width: 150,
},
defaultSortBy: 'termDisplayName',
defaultSortDirection: 'asc',
},
};
};
2 changes: 2 additions & 0 deletions src/plugins/recordTypes/citation/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export default (configContext) => {
sortBy: 'collectionspace_core:updatedAt',
width: 150,
},
defaultSortBy: 'termDisplayName',
defaultSortDirection: 'asc',
},
};
};
2 changes: 2 additions & 0 deletions src/plugins/recordTypes/concept/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export default (configContext) => {
sortBy: 'collectionspace_core:updatedAt',
width: 150,
},
defaultSortBy: 'termDisplayName',
defaultSortDirection: 'asc',
},
};
};
2 changes: 2 additions & 0 deletions src/plugins/recordTypes/location/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ export default (configContext) => {
sortBy: 'collectionspace_core:updatedAt',
width: 150,
},
defaultSortBy: 'termDisplayName',
defaultSortDirection: 'asc',
},
};
};
2 changes: 2 additions & 0 deletions src/plugins/recordTypes/organization/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ export default (configContext) => {
sortBy: 'collectionspace_core:updatedAt',
width: 150,
},
defaultSortBy: 'termDisplayName',
defaultSortDirection: 'asc',
},
};
};
2 changes: 2 additions & 0 deletions src/plugins/recordTypes/person/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ export default (configContext) => {
sortBy: 'collectionspace_core:updatedAt',
width: 150,
},
defaultSortBy: 'termDisplayName',
defaultSortDirection: 'asc',
},
};
};
2 changes: 2 additions & 0 deletions src/plugins/recordTypes/place/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export default (configContext) => {
sortBy: 'collectionspace_core:updatedAt',
width: 150,
},
defaultSortBy: 'termDisplayName',
defaultSortDirection: 'asc',
},
};
};
2 changes: 2 additions & 0 deletions src/plugins/recordTypes/work/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export default (configContext) => {
sortBy: 'collectionspace_core:updatedAt',
width: 150,
},
defaultSortBy: 'termDisplayName',
defaultSortDirection: 'asc',
},
};
};
Loading