rez-table-listing-mui 1.3.6 → 1.3.7
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/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/listing/components/filter/components/forms/components/Filter-criteria.tsx +5 -5
- package/src/listing/types/filter.ts +1 -0
package/package.json
CHANGED
|
@@ -54,15 +54,14 @@ const FilterCriteria = ({
|
|
|
54
54
|
const handleAddFilter = (
|
|
55
55
|
attribute: FilterDataMainFilterEntityWiseCriteriaProps
|
|
56
56
|
) => {
|
|
57
|
-
const dropdownOptions =
|
|
58
|
-
columnsData?.operation_list[attribute?.element_type];
|
|
57
|
+
const dropdownOptions = columnsData?.operation_list[attribute?.data_type];
|
|
59
58
|
|
|
60
|
-
const defaultValue = attribute.
|
|
59
|
+
const defaultValue = attribute.data_type === "multiselect" ? [] : "";
|
|
61
60
|
|
|
62
61
|
const defaultOperator = dropdownOptions?.[0]?.value || "";
|
|
63
62
|
|
|
64
63
|
const matchingDropdownList =
|
|
65
|
-
columnsData?.operation_list[attribute.
|
|
64
|
+
columnsData?.operation_list[attribute.data_type] || [];
|
|
66
65
|
|
|
67
66
|
const newFilter = {
|
|
68
67
|
filter_attribute: attribute.attribute_key,
|
|
@@ -75,7 +74,8 @@ const FilterCriteria = ({
|
|
|
75
74
|
...newFilter,
|
|
76
75
|
id: attribute?.id,
|
|
77
76
|
filter_attribute_name: attribute?.name,
|
|
78
|
-
filter_attribute_data_type:
|
|
77
|
+
filter_attribute_data_type:
|
|
78
|
+
attribute?.data_type || attribute?.element_type,
|
|
79
79
|
datasource_list: attribute?.datasource_list,
|
|
80
80
|
dropdown_list: matchingDropdownList,
|
|
81
81
|
filter_entity_name: selectedFilterEntity?.label,
|