rez-table-listing-mui 1.3.25 → 1.3.27
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/package.json
CHANGED
|
@@ -879,22 +879,46 @@ const FilterForm = ({
|
|
|
879
879
|
];
|
|
880
880
|
|
|
881
881
|
// Should the date picker be shown?
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
882
|
+
if (filter?.filter_attribute_data_type === "date") {
|
|
883
|
+
const showDatePicker =
|
|
884
|
+
operator &&
|
|
885
|
+
dateAllowedOperators.includes(operator);
|
|
886
|
+
|
|
887
|
+
const showTextInsteadOfDate =
|
|
888
|
+
!operator ||
|
|
889
|
+
!dateAllowedOperators.includes(operator);
|
|
890
|
+
|
|
891
|
+
if (showTextInsteadOfDate) {
|
|
892
|
+
console.log(
|
|
893
|
+
"Inside showtext",
|
|
894
|
+
showTextInsteadOfDate
|
|
895
|
+
);
|
|
896
|
+
|
|
897
|
+
return (
|
|
898
|
+
<FormTextfield
|
|
899
|
+
filter={filter}
|
|
900
|
+
control={control}
|
|
901
|
+
onValueChange={updateFiltersFromForm}
|
|
902
|
+
/>
|
|
903
|
+
);
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
// const showDatePicker =
|
|
908
|
+
// filter?.filter_attribute_data_type === "date" &&
|
|
909
|
+
// operator &&
|
|
910
|
+
// dateAllowedOperators.includes(operator);
|
|
911
|
+
|
|
912
|
+
// // Should textfield shown instead for date?
|
|
913
|
+
// const showTextInsteadOfDate =
|
|
914
|
+
// !operator ||
|
|
915
|
+
// !dateAllowedOperators.includes(operator);
|
|
916
|
+
|
|
917
|
+
// console.log("Show Date Picker:", showDatePicker);
|
|
918
|
+
// console.log(
|
|
919
|
+
// "Show Text Instead:",
|
|
920
|
+
// showTextInsteadOfDate
|
|
921
|
+
// );
|
|
898
922
|
|
|
899
923
|
// Now render exactly same logic except date override
|
|
900
924
|
if (
|
|
@@ -921,25 +945,27 @@ const FilterForm = ({
|
|
|
921
945
|
);
|
|
922
946
|
}
|
|
923
947
|
|
|
924
|
-
//
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
948
|
+
// DATE LOGIC
|
|
949
|
+
|
|
950
|
+
// if (showDatePicker) {
|
|
951
|
+
// console.log("Inside Date", showDatePicker);
|
|
952
|
+
// return (
|
|
953
|
+
// <FormDatePicker
|
|
954
|
+
// filter={filter}
|
|
955
|
+
// control={control}
|
|
956
|
+
// onValueChange={updateFiltersFromForm}
|
|
957
|
+
// />
|
|
958
|
+
// );
|
|
959
|
+
// } else {
|
|
960
|
+
// console.log("Inside Text", FormTextfield);
|
|
961
|
+
// return (
|
|
962
|
+
// <FormTextfield
|
|
963
|
+
// filter={filter}
|
|
964
|
+
// control={control}
|
|
965
|
+
// onValueChange={updateFiltersFromForm}
|
|
966
|
+
// />
|
|
967
|
+
// );
|
|
968
|
+
// }
|
|
943
969
|
|
|
944
970
|
// if (showTextInsteadOfDate) {
|
|
945
971
|
// console.log(
|