@bindu-dashing/dam-solution 1.0.1 → 2.9.12
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.
|
@@ -254,16 +254,14 @@ function ImagePickerFilters(_ref) {
|
|
|
254
254
|
(0, _react.useEffect)(() => {
|
|
255
255
|
try {
|
|
256
256
|
if (fields.length > 0) {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
257
|
+
var _fields$;
|
|
258
|
+
const fieldName = (fields === null || fields === void 0 ? void 0 : (_fields$ = fields[0]) === null || _fields$ === void 0 ? void 0 : _fields$.name) || "";
|
|
259
|
+
if (value && typeof value === "object" && Object.keys(value).length > 0) {
|
|
260
260
|
const currentFilters = {
|
|
261
|
-
|
|
261
|
+
...value
|
|
262
262
|
};
|
|
263
263
|
onFilter(currentFilters, {}, fieldName, true);
|
|
264
264
|
} else {
|
|
265
|
-
var _fields$2;
|
|
266
|
-
const fieldName = (fields === null || fields === void 0 ? void 0 : (_fields$2 = fields[0]) === null || _fields$2 === void 0 ? void 0 : _fields$2.name) || "";
|
|
267
265
|
const currentFilters = {
|
|
268
266
|
[fieldName]: ""
|
|
269
267
|
};
|