我有一个素材形式
const actions = [
<FlatButton
label="Cancel"
primary
onTouchTap={this.handleClose}
/>,
<FlatButton
label="Ok"
type="submit"
primary
onTouchTap={this.handleTestSubmit}
/>,
];
<form refs="testform" onSubmit={handleSubmit(this.ActualSubmitMethod)}>
<RaisedButton primary label="Submit" onTouchTap={this.handleOpen} type="button" />
<Dialog title="test"
actions={actions} modal={false} open=
{this.state.open} onRequestClose={this.handleClose}>
Do you want confirm?>
</Dialog>
</forms>
在这种情况下,我要么得到/ xyz页面未找到错误,要么没有被调用。
对于简洁操作,不会添加handleOpen和handleClose。
handleTestSubmit = (e) => {
e.preventDefault();
this.refs.testform.submit();
};
当我搜索示例时,它显示了以下内容
<dialog>
<form></form>
</dialog>
当然上述情况不符合我的目的