simplifies logic in Relationship
This commit is contained in:
@@ -269,14 +269,14 @@ const RelationshipFieldType = (props) => {
|
||||
|
||||
useEffect(() => {
|
||||
const formatDefaultValue = (valueToFormat) => {
|
||||
let incomingRelatedDocument = valueToFormat;
|
||||
|
||||
if (hasMultipleRelations) {
|
||||
incomingRelatedDocument = valueToFormat.value
|
||||
return incomingRelatedDocument.id;
|
||||
return {
|
||||
...valueToFormat,
|
||||
value: valueToFormat.value.id
|
||||
};
|
||||
}
|
||||
|
||||
return incomingRelatedDocument.id;
|
||||
return valueToFormat.id;
|
||||
}
|
||||
|
||||
if (defaultValue) {
|
||||
|
||||
@@ -68,14 +68,14 @@ $stroke-width : 1px;
|
||||
%inputShadow {
|
||||
@extend %shadow-sm;
|
||||
|
||||
&:hover {
|
||||
box-shadow: 0 2px 4px 0 rgba(0,2,4,.1),
|
||||
0 5px 20px 0 rgba(0,2,4,.06);
|
||||
&:hover {
|
||||
box-shadow: 0 2px 4px 0 rgba(0,2,4,.1), 0 5px 20px 0 rgba(0,2,4,.06);
|
||||
}
|
||||
|
||||
&:active, &:focus {
|
||||
@extend %inputShadowActive;
|
||||
}
|
||||
box-shadow: 0 2px 4px 0 rgba(0,2,4,.1),
|
||||
0 10px 20px 0 rgba(0,2,4,.08);
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user