Skip to content

Commit

Permalink
[frontend] Modifications to orderBy and orderMode in searchPagination…
Browse files Browse the repository at this point in the history
…Options (#9280)
  • Loading branch information
Gwendoline-FAVRE-FELIX committed Jan 14, 2025
1 parent 8997343 commit bb71acd
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -507,10 +507,14 @@ const StixNestedRefRelationshipCreationFromEntity = ({
const searchPaginationOptions = {
search: searchTerm,
filters: removeIdFromFilterGroupObject(filters),
orderBy: searchTerm.length > 0 ? null : 'created_at',
orderMode: searchTerm.length > 0 ? null : 'desc',
orderBy: null,
orderMode: null,
types: targetStixCoreObjectTypes,
};
if (searchTerm.length === 0) {
searchPaginationOptions.orderBy = sortBy;
searchPaginationOptions.orderMode = orderAsc ? 'asc' : 'desc';
}
const dataColumns = {
entity_type: {
label: 'Type',
Expand Down

0 comments on commit bb71acd

Please sign in to comment.