fix: custom fields values resetting in ui (#626)
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
import React from 'react';
|
||||
import { Props } from './types';
|
||||
import withCondition from '../../forms/withCondition';
|
||||
|
||||
const RenderCustomComponent: React.FC<Props> = (props) => {
|
||||
const { CustomComponent, DefaultComponent, componentProps } = props;
|
||||
|
||||
if (CustomComponent) {
|
||||
const ConditionalCustomComponent = withCondition(CustomComponent);
|
||||
return (
|
||||
<ConditionalCustomComponent {...componentProps} />
|
||||
<CustomComponent {...componentProps} />
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user