调用 render 的时候不要把 data 传到 schema 里面,否则会认为是 defaultData

This commit is contained in:
2betop 2020-05-29 16:20:19 +08:00
parent 6cb0e6a1d8
commit a827a72442
2 changed files with 2 additions and 1 deletions

View File

@ -8,7 +8,7 @@ export interface ButtonProps extends FormControlProps, Omit<Button, 'size'> {}
export class ButtonControl extends React.Component<ButtonProps, any> {
static defaultProps: Partial<ButtonProps> = {};
render() {
const {render, type, children, ...rest} = this.props;
const {render, type, children, data, ...rest} = this.props;
return render('action', {
...rest,

View File

@ -49,6 +49,7 @@ export default class StaticControl extends React.Component<StaticProps, any> {
type,
render,
children,
data,
...rest
} = this.props;