自定义组件验证问题修复
This commit is contained in:
parent
c773a17281
commit
760158ee3a
|
@ -596,10 +596,12 @@ class SchemaRenderer extends React.Component<SchemaRendererProps, any> {
|
|||
render: this.renderChild
|
||||
});
|
||||
} else if (typeof schema.component === 'function') {
|
||||
const isSFC = !(schema.component.prototype instanceof React.Component);
|
||||
return React.createElement(schema.component as any, {
|
||||
...rest,
|
||||
...schema,
|
||||
$path: $path,
|
||||
ref: isSFC ? undefined : this.refFn,
|
||||
render: this.renderChild
|
||||
});
|
||||
} else if (!this.renderer) {
|
||||
|
|
Loading…
Reference in New Issue