调用 render 的时候不要把 data 传到 schema 里面,否则会认为是 defaultData
This commit is contained in:
parent
6cb0e6a1d8
commit
a827a72442
|
@ -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,
|
||||
|
|
|
@ -49,6 +49,7 @@ export default class StaticControl extends React.Component<StaticProps, any> {
|
|||
type,
|
||||
render,
|
||||
children,
|
||||
data,
|
||||
...rest
|
||||
} = this.props;
|
||||
|
||||
|
|
Loading…
Reference in New Issue