sag_components 1.0.822 → 1.0.824
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.
|
@@ -90,7 +90,7 @@ const DropdownMultiNew = _ref => {
|
|
|
90
90
|
setInputValue(e.target.value);
|
|
91
91
|
};
|
|
92
92
|
const isDropdowned = option => {
|
|
93
|
-
if (!selectedOptions) return false;
|
|
93
|
+
if (!selectedOptions || (selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) === 0) return false;
|
|
94
94
|
const result = selectedOptions.some(selectedOption => selectedOption.value === option.value);
|
|
95
95
|
return result;
|
|
96
96
|
};
|
|
@@ -39,6 +39,7 @@ const DropdownSingleNew = _ref => {
|
|
|
39
39
|
const containerRef = (0, _react.useRef)(null);
|
|
40
40
|
const filteredoptions = options === null || options === void 0 ? void 0 : options.filter(option => option.label.toLowerCase().includes(inputValue.toLowerCase()));
|
|
41
41
|
(0, _react.useEffect)(() => {
|
|
42
|
+
console.log('selectedOptions selectedValue:', selectedValue);
|
|
42
43
|
if (selectedValue) {
|
|
43
44
|
setSelectedOptions(selectedValue);
|
|
44
45
|
}
|
|
@@ -75,7 +76,8 @@ const DropdownSingleNew = _ref => {
|
|
|
75
76
|
}
|
|
76
77
|
};
|
|
77
78
|
const isDropdowned = option => {
|
|
78
|
-
|
|
79
|
+
console.log('selectedOptions 1', selectedOptions);
|
|
80
|
+
if (!selectedOptions || (selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) === 0) return false;
|
|
79
81
|
const result = selectedOptions.some(selectedOption => selectedOption.value === option.value);
|
|
80
82
|
return result;
|
|
81
83
|
};
|
|
@@ -196,6 +196,15 @@ const FilterPanel = props => {
|
|
|
196
196
|
var _item$periodPickerSel, _item$periodPickerSel2;
|
|
197
197
|
let content;
|
|
198
198
|
const currentValue = item.periodPickerSelectedValue && ((_item$periodPickerSel = item.periodPickerSelectedValue) === null || _item$periodPickerSel === void 0 ? void 0 : _item$periodPickerSel.length) > 0 ? (_item$periodPickerSel2 = item.periodPickerSelectedValue[0]) === null || _item$periodPickerSel2 === void 0 ? void 0 : _item$periodPickerSel2.value : '';
|
|
199
|
+
let selectedValueYear = [];
|
|
200
|
+
if (typeof item.selectedValue === 'string') {
|
|
201
|
+
selectedValueYear = [{
|
|
202
|
+
value: item.selectedValue,
|
|
203
|
+
label: item.selectedValue
|
|
204
|
+
}];
|
|
205
|
+
} else {
|
|
206
|
+
selectedValueYear = item.selectedValue;
|
|
207
|
+
}
|
|
199
208
|
switch (currentValue) {
|
|
200
209
|
case 'daterange':
|
|
201
210
|
content = /*#__PURE__*/_react.default.createElement(_FilterPanel.DatePickerContainer, {
|
|
@@ -321,7 +330,7 @@ const FilterPanel = props => {
|
|
|
321
330
|
xIconShow: false,
|
|
322
331
|
error: false,
|
|
323
332
|
errorMessage: "",
|
|
324
|
-
selectedValue:
|
|
333
|
+
selectedValue: selectedValueYear,
|
|
325
334
|
onChange: eventDropdownYear => onChangeDropdownYearHandler(eventDropdownYear, item),
|
|
326
335
|
options: getYearsArray(),
|
|
327
336
|
width: "100%"
|
|
@@ -426,7 +435,6 @@ const FilterPanel = props => {
|
|
|
426
435
|
}));
|
|
427
436
|
break;
|
|
428
437
|
case 'periodpicker':
|
|
429
|
-
console.log('periodPickerSelectedValue', item.periodPickerSelectedValue);
|
|
430
438
|
content = /*#__PURE__*/_react.default.createElement(_FilterPanel.PeriodPickerContainer, {
|
|
431
439
|
className: "PeriodPickerContainer"
|
|
432
440
|
}, /*#__PURE__*/_react.default.createElement(_DropdownNew.DropdownNew, {
|