Skip to content

Commit 327ad0b

Browse files
[frontend] Modifications to orderBy and orderMode in searchPaginationOptions (#9280)
1 parent b293e2e commit 327ad0b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

opencti-platform/opencti-front/src/private/components/common/stix_nested_ref_relationships/StixNestedRefRelationshipCreationFromEntity.jsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -507,10 +507,14 @@ const StixNestedRefRelationshipCreationFromEntity = ({
507507
const searchPaginationOptions = {
508508
search: searchTerm,
509509
filters: removeIdFromFilterGroupObject(filters),
510-
orderBy: searchTerm.length > 0 ? null : 'created_at',
511-
orderMode: searchTerm.length > 0 ? null : 'desc',
510+
orderBy: null,
511+
orderMode: null,
512512
types: targetStixCoreObjectTypes,
513513
};
514+
if (searchTerm.length === 0) {
515+
searchPaginationOptions.orderBy = sortBy;
516+
searchPaginationOptions.orderMode = orderAsc ? 'asc' : 'desc';
517+
}
514518
const dataColumns = {
515519
entity_type: {
516520
label: 'Type',

0 commit comments

Comments
 (0)