@@ -211,11 +211,7 @@ const WbwDetailWidget = ({
console.debug("WbwDetailBasic onchange", e);
fieldChanged(e.field, e.value);
}}
- onRelationAdd={() => {
- if (typeof onClose !== "undefined") {
- onClose();
- }
- }}
+ onRelationAdd={onClose}
/>
),
},
@@ -267,11 +267,7 @@ const WbwDetailBasicWidget = ({
onChange(e);
}
- if (typeof onRelationAdd !== "undefined") {
- onRelationAdd();
+ onRelationAdd={onRelationAdd}
</Form>
</>
@@ -67,11 +67,7 @@ const WbwDetailBasicRelationWidget = ({
- onAdd={() => {
+ onAdd={onRelationAdd}
onFromList={(value: string[]) => setFromList(value)}
</Collapse.Panel>