@followupus/common 0.10.27 → 0.10.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/shared/shared.js +5 -5
- package/package.json +1 -1
package/dist/shared/shared.js
CHANGED
|
@@ -413,7 +413,7 @@ export const getValidConditions = (filter, headers, currentUserId, escapeHeaderC
|
|
|
413
413
|
}
|
|
414
414
|
if (checkHeader?.type === COLUMN_TYPES.DATE ||
|
|
415
415
|
checkHeader?.type === COLUMN_TYPES.CREATED_AT) {
|
|
416
|
-
_.remove(c.value, v => Object.values(SpecialKeyInDateFilter).includes(v));
|
|
416
|
+
_.remove(c.value ?? [], v => Object.values(SpecialKeyInDateFilter).includes(v));
|
|
417
417
|
}
|
|
418
418
|
});
|
|
419
419
|
// for dropdown, if set the option is in filter condition, and user delete the option. should ignore it or make the option can't be deleted
|
|
@@ -479,16 +479,16 @@ const isInConditionValues = (itemVal, valueType, condition) => {
|
|
|
479
479
|
case "number":
|
|
480
480
|
case "string":
|
|
481
481
|
return ((condition.blank && !itemVal) ||
|
|
482
|
-
!!condition.value
|
|
482
|
+
!!condition.value?.find(val => val === itemVal));
|
|
483
483
|
case "stringArray":
|
|
484
484
|
return ((condition.blank && !itemVal?.length) ||
|
|
485
|
-
condition.value
|
|
485
|
+
!!condition.value?.some(val => Array.isArray(itemVal) && itemVal?.includes(val)));
|
|
486
486
|
case "object":
|
|
487
487
|
return ((condition.blank && !itemVal) ||
|
|
488
|
-
!!condition.value
|
|
488
|
+
!!condition.value?.find(val => _.isEqual(val, itemVal)));
|
|
489
489
|
case "objectArray":
|
|
490
490
|
return ((condition.blank && !itemVal?.length) ||
|
|
491
|
-
condition.value
|
|
491
|
+
!!condition.value?.some(val => Array.isArray(itemVal) &&
|
|
492
492
|
itemVal.find(existVal => _.isEqual(val, existVal))));
|
|
493
493
|
default:
|
|
494
494
|
break;
|