sccoreui 3.6.0 → 3.6.2

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.
@@ -116,19 +116,21 @@ const DatePicker = (props) => {
116
116
  setPropsState(datePickerProps);
117
117
  }, []);
118
118
  (0, react_1.useEffect)(() => {
119
- if (props.value === null) {
120
- setFromDate(null);
121
- return;
122
- }
123
- setFromDate(props.value);
124
- const frmD = props.value[0].toLocaleDateString('en-US', options);
125
- setFromDateFormate(frmD);
126
- if (props.value[1]) {
127
- const toD = props.value[1].toLocaleDateString('en-US', options);
128
- setToDateFormate(toD);
129
- }
130
- else {
131
- setToDateFormate('-');
119
+ if (props.value !== undefined) {
120
+ if (props.value === null) {
121
+ setFromDate(null);
122
+ return;
123
+ }
124
+ setFromDate(props.value);
125
+ const frmD = props.value[0].toLocaleDateString('en-US', options);
126
+ setFromDateFormate(frmD);
127
+ if (props.value[1]) {
128
+ const toD = props.value[1].toLocaleDateString('en-US', options);
129
+ setToDateFormate(toD);
130
+ }
131
+ else {
132
+ setToDateFormate('-');
133
+ }
132
134
  }
133
135
  }, [props.value]);
134
136
  const clearIcon = () => {
@@ -39,7 +39,8 @@ const MultiSelectDropDown = (props) => {
39
39
  setIsMoreThenOne(false);
40
40
  }, [items]);
41
41
  (0, react_1.useEffect)(() => {
42
- setItems(props.value);
42
+ if (props.value !== undefined)
43
+ setItems(props.value);
43
44
  }, [props.value]);
44
45
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [props.dropdownType !== '' &&
45
46
  (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `sc_custom_multiselect flex align-items-center relative ${(props.dropdownType !== undefined && props.dropdownType === "status") ? 'status_dropdown' : ''} ${isMoreThanOne ? `selected_multile ${`selected_num_` + items.length}` : ''}` }, { children: [(0, jsx_runtime_1.jsx)(LeftSection, {}), (0, jsx_runtime_1.jsx)(multiselect_1.MultiSelect, { value: items, onChange: (e) => onChange(e), options: props.options, optionLabel: "name", itemTemplate: props.dropdownType === 'status' ? (option) => { return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: `status_dropdown_item pl-3 ${option.name}` }, { children: option.name })) })); } : '', filter: true, placeholder: props.placeholder, display: "chip", maxSelectedLabels: props.maxSelectedLabels, className: `w-full md:w-20rem` }), items.length > 0 &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "3.6.0",
3
+ "version": "3.6.2",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",