Skip to content

Commit

Permalink
[frontend] fix filter order priority
Browse files Browse the repository at this point in the history
  • Loading branch information
savacano28 committed Sep 26, 2024
1 parent ee7c842 commit 8a27198
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ export const availableOperators = (propertySchema: PropertySchemaDTO) => {
if (propertySchema.schema_property_type.includes('instant')) {
return ['gt', 'gte', 'lt', 'lte', 'empty', 'not_empty'];
}
// Array
if (propertySchema.schema_property_type_array || propertySchema.schema_property_values) {
return ['contains', 'not_contains', 'empty', 'not_empty'];
}
// Enum & not array
if (propertySchema.schema_property_values && !propertySchema.schema_property_type_array) {
return ['eq'];
Expand All @@ -103,6 +99,10 @@ export const availableOperators = (propertySchema: PropertySchemaDTO) => {
if (propertySchema.schema_property_has_dynamic_value && !propertySchema.schema_property_type_array) {
return ['contains', 'not_contains', 'empty', 'not_empty'];
}
// Array
if (propertySchema.schema_property_values || propertySchema.schema_property_type_array) {
return ['contains', 'not_contains', 'empty', 'not_empty'];
}
return [
'eq',
'not_eq',
Expand Down

0 comments on commit 8a27198

Please sign in to comment.