@dartech/arsenal-ui 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +4 -10
- package/package.json +1 -1
- package/src/interfaces/definition.d.ts +0 -3
- package/src/lib/Property/UpsertProperty/PropertyValueField/BooleanValueField.d.ts +1 -0
- package/src/lib/Property/UpsertProperty/PropertyValueField/DateTimeValueField.d.ts +1 -0
- package/src/lib/Property/UpsertProperty/PropertyValueField/DateValueField.d.ts +1 -0
- package/src/lib/Property/UpsertProperty/PropertyValueField/JsonValueField.d.ts +1 -0
- package/src/lib/Property/UpsertProperty/PropertyValueField/TimeValueField.d.ts +1 -0
- package/src/lib/Property/ViewProperty/PropertyItem.d.ts +1 -0
package/index.js
CHANGED
@@ -746,12 +746,12 @@ const ControlAutocomplete = _a => {
|
|
746
746
|
labelKey
|
747
747
|
});
|
748
748
|
const handleChange = (_, value) => {
|
749
|
-
onChange(useStringValue ? value
|
749
|
+
onChange(useStringValue ? _get(value, valueKey) : value);
|
750
750
|
setLocalValue(value);
|
751
751
|
};
|
752
752
|
useEffect(() => {
|
753
753
|
if (typeof value === 'string' && valueKey && useStringValue && !localValue && options.length && !!options[0] && typeof options[0] === 'object') {
|
754
|
-
setLocalValue(options.find(el => el
|
754
|
+
setLocalValue(options.find(el => _get(el, valueKey) === value));
|
755
755
|
} else setLocalValue(value);
|
756
756
|
}, [localValue, options, useStringValue, value, valueKey]);
|
757
757
|
return jsx(Autocomplete, Object.assign({}, fieldProps, {
|
@@ -867,11 +867,11 @@ function ControlQueryAutocomplete(_a) {
|
|
867
867
|
if (!isDirty && formValue && itemQueryFunction) {
|
868
868
|
let requestValue = formValue;
|
869
869
|
if (typeof formValue === 'object' && valueKey in formValue) {
|
870
|
-
requestValue = formValue
|
870
|
+
requestValue = _get(formValue, valueKey);
|
871
871
|
}
|
872
872
|
itemQueryFunction(requestValue).then(item => {
|
873
873
|
setFieldValue(item);
|
874
|
-
setInputValue(item
|
874
|
+
setInputValue(_get(item, labelKey));
|
875
875
|
}).catch();
|
876
876
|
}
|
877
877
|
}, [formValue, isDirty, valueKey, labelKey, itemQueryFunction, setFieldValue]);
|
@@ -1627,9 +1627,6 @@ const propertiesArrayToObject = (properties, isGlobalParameter) => {
|
|
1627
1627
|
name,
|
1628
1628
|
isRequired,
|
1629
1629
|
isMultiple,
|
1630
|
-
isVisible,
|
1631
|
-
isFillable,
|
1632
|
-
isEditable,
|
1633
1630
|
sortOrder,
|
1634
1631
|
isEnabled,
|
1635
1632
|
uiSettings,
|
@@ -1648,9 +1645,6 @@ const propertiesArrayToObject = (properties, isGlobalParameter) => {
|
|
1648
1645
|
}, getPropertyValue(Object.assign(Object.assign({}, property), {
|
1649
1646
|
propertyType
|
1650
1647
|
}), isGlobalParameter));
|
1651
|
-
if (isVisible !== undefined) resultProperty.isVisible = isVisible;
|
1652
|
-
if (isFillable !== undefined) resultProperty.isFillable = isFillable;
|
1653
|
-
if (isEditable !== undefined) resultProperty.isEditable = isEditable;
|
1654
1648
|
if ('isViewableInList' in property) {
|
1655
1649
|
resultProperty['isViewableInList'] = property.isViewableInList;
|
1656
1650
|
}
|
package/package.json
CHANGED