Browse Source

Repair query form parameters not reset problem (#398)

* Repair parameters not reset problem

* fix #400 getFieldDecorator more than one
pull/382/merge
陈帅 9 years ago
committed by 偏右
parent
commit
e783edb590
  1. 32
      src/routes/Forms/BasicForm.js
  2. 3
      src/routes/List/TableList.js

32
src/routes/Forms/BasicForm.js

@ -156,21 +156,23 @@ export default class BasicForms extends PureComponent {
<Radio value="3">不公开</Radio>
</Radio.Group>
)}
{getFieldDecorator('publicUsers', {
})(
<Select
mode="multiple"
placeholder="公开给"
style={{
margin: '8px 0',
display: getFieldValue('public') === '2' ? 'block' : 'none',
}}
>
<Option value="1">同事甲</Option>
<Option value="2">同事乙</Option>
<Option value="3">同事丙</Option>
</Select>
)}
<FormItem>
{getFieldDecorator('publicUsers', {
})(
<Select
mode="multiple"
placeholder="公开给"
style={{
margin: '8px 0',
display: getFieldValue('public') === '2' ? 'block' : 'none',
}}
>
<Option value="1">同事甲</Option>
<Option value="2">同事乙</Option>
<Option value="3">同事丙</Option>
</Select>
)}
</FormItem>
</div>
</FormItem>
<FormItem {...submitFormLayout} style={{ marginTop: 32 }}>

3
src/routes/List/TableList.js

@ -59,6 +59,9 @@ export default class TableList extends PureComponent {
handleFormReset = () => {
const { form, dispatch } = this.props;
form.resetFields();
this.setState({
formValues: {},
});
dispatch({
type: 'rule/fetch',
payload: {},

Loading…
Cancel
Save