我正在处理Redux表单。如果服务器响应延迟,则提交表单时,我需要显示进度栏。但是,一旦收到回复,进度栏应该会禁用,并且表格会继续。
我正在使用Material Ui CircularProgress @ material-ui / core / CircularProgress
return (
<form onSubmit={handleSubmit}>
<Field
name="username"
type="text"
component={renderField}
label="Username"
/>
<Field
name="email"
type="email"
component={renderField}
label="Email"
/>
<Field
name="age"
type="number"
component={renderField}
label="Age"
/>
<Field
name="phone"
type="number"
component={renderField}
label="Phone number"
/>
<div>
<button type="submit" disabled={submitting}>
Submit
</button>
<button type="button" disabled={pristine || submitting} onClick={reset}>
Clear Values
</button>
</div>
</form>
)
如何提交,我确定是否需要停止CircularProgress。