@integry/sdk 4.6.97 → 4.6.99
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
|
@@ -75,7 +75,26 @@ const Input = forwardRef((props: InputProps, ref) => {
|
|
|
75
75
|
handleRemoveInputFromParent,
|
|
76
76
|
} = props;
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
let parsedValue = [''];
|
|
79
|
+
if (value) {
|
|
80
|
+
if (typeof value === 'string') {
|
|
81
|
+
if (isArray) {
|
|
82
|
+
try {
|
|
83
|
+
parsedValue = JSON.parse(value);
|
|
84
|
+
if (Array.isArray(parsedValue) && parsedValue.length === 0) {
|
|
85
|
+
parsedValue = [''];
|
|
86
|
+
}
|
|
87
|
+
} catch (e) {
|
|
88
|
+
parsedValue = [value];
|
|
89
|
+
}
|
|
90
|
+
} else {
|
|
91
|
+
parsedValue = [value];
|
|
92
|
+
}
|
|
93
|
+
} else {
|
|
94
|
+
parsedValue = value;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
const [values, setValues] = useState(parsedValue); // Track array of values
|
|
79
98
|
const [invalidInput, setInvalidInput] = useState(false);
|
|
80
99
|
const [showErrorOnFocusLoss, setShowErrorOnFocusLoss] = useState(true);
|
|
81
100
|
|
|
@@ -672,6 +672,16 @@ const MultipurposeField = (props: MultipurposeFieldProps) => {
|
|
|
672
672
|
onButtonClickScript=${onButtonClickScript}
|
|
673
673
|
buttonScriptRequiresAuthToken=${buttonScriptRequiresAuthToken}
|
|
674
674
|
apiHandler=${props.apiHandler}
|
|
675
|
+
...${isArray
|
|
676
|
+
? {
|
|
677
|
+
value:
|
|
678
|
+
showTagMenu && !isEditable
|
|
679
|
+
? searchValue
|
|
680
|
+
: tempPlaceholder
|
|
681
|
+
? ''
|
|
682
|
+
: currentValue,
|
|
683
|
+
}
|
|
684
|
+
: {}}
|
|
675
685
|
/>
|
|
676
686
|
<div style="display:none">
|
|
677
687
|
<${Input}
|