Add rating filter/sort + fix isEmpty/isNotEmpty + fix combinedViewFilters (#6310)
## Context - Adding RATING sort and filter capabilities. - Fixing isEmpty/isNotEmpty filters - Fixing combined view filters so it combines filters per field metadata and not per filter id. This is more a product question but to me it does not make sense to apply multiples filters on the same field IF the operations is wrapped in a AND. If at some point we want to put a OR instead then that would make more sense
This commit is contained in:
@ -34,6 +34,7 @@ export const formatFieldMetadataItemsAsFilterDefinitions = ({
|
||||
FieldMetadataType.Relation,
|
||||
FieldMetadataType.Select,
|
||||
FieldMetadataType.Currency,
|
||||
FieldMetadataType.Rating,
|
||||
].includes(field.type)
|
||||
) {
|
||||
return acc;
|
||||
@ -85,6 +86,8 @@ export const getFilterTypeFromFieldType = (fieldType: FieldMetadataType) => {
|
||||
return 'MULTI_SELECT';
|
||||
case FieldMetadataType.Address:
|
||||
return 'ADDRESS';
|
||||
case FieldMetadataType.Rating:
|
||||
return 'RATING';
|
||||
default:
|
||||
return 'TEXT';
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ export const formatFieldMetadataItemsAsSortDefinitions = ({
|
||||
FieldMetadataType.Phone,
|
||||
FieldMetadataType.Email,
|
||||
FieldMetadataType.FullName,
|
||||
FieldMetadataType.Rating,
|
||||
].includes(field.type)
|
||||
) {
|
||||
return acc;
|
||||
|
||||
Reference in New Issue
Block a user