Added parallel code path to set new record sorts state (#10345)
This PR implements a parallel code path to set record sorts without impacting the actual sort, like we did on record filter. We add a ViewBarRecordSortEffect which mirrors ViewBarRecordFilterEffect. It also adds availableFieldMetadataItemsForSortFamilySelector to replace sortDefinitions progressively.
This commit is contained in:
@ -0,0 +1,13 @@
|
||||
import { SORTABLE_FIELD_METADATA_TYPES } from '@/object-metadata/constants/SortableFieldMetadataTypes';
|
||||
import { FieldMetadataItem } from '@/object-metadata/types/FieldMetadataItem';
|
||||
|
||||
export const filterSortableFieldMetadataItems = (field: FieldMetadataItem) => {
|
||||
const isSystemField = field.isSystem;
|
||||
const isFieldActive = field.isActive;
|
||||
|
||||
const isFieldTypeSortable = SORTABLE_FIELD_METADATA_TYPES.includes(
|
||||
field.type,
|
||||
);
|
||||
|
||||
return !isSystemField && isFieldActive && isFieldTypeSortable;
|
||||
};
|
||||
@ -11,14 +11,6 @@ export const getRelationObjectMetadataNameSingular = ({
|
||||
return field.relationDefinition?.targetObjectMetadata.nameSingular;
|
||||
};
|
||||
|
||||
export const getRelationObjectMetadataNamePlural = ({
|
||||
field,
|
||||
}: {
|
||||
field: ObjectMetadataItem['fields'][0];
|
||||
}): string | undefined => {
|
||||
return field.relationDefinition?.targetObjectMetadata.namePlural;
|
||||
};
|
||||
|
||||
export const getFilterTypeFromFieldType = (
|
||||
fieldType: FieldMetadataType,
|
||||
): FilterableFieldType => {
|
||||
|
||||
Reference in New Issue
Block a user