Commit e783edb5 authored by 陈帅's avatar 陈帅 Committed by 偏右

Repair query form parameters not reset problem (#398)

* Repair parameters not reset problem

* fix #400 getFieldDecorator more than one
parent 5715817c
...@@ -156,21 +156,23 @@ export default class BasicForms extends PureComponent { ...@@ -156,21 +156,23 @@ export default class BasicForms extends PureComponent {
<Radio value="3">不公开</Radio> <Radio value="3">不公开</Radio>
</Radio.Group> </Radio.Group>
)} )}
{getFieldDecorator('publicUsers', { <FormItem>
})( {getFieldDecorator('publicUsers', {
<Select })(
mode="multiple" <Select
placeholder="公开给" mode="multiple"
style={{ placeholder="公开给"
margin: '8px 0', style={{
display: getFieldValue('public') === '2' ? 'block' : 'none', margin: '8px 0',
}} display: getFieldValue('public') === '2' ? 'block' : 'none',
> }}
<Option value="1">同事甲</Option> >
<Option value="2">同事乙</Option> <Option value="1">同事甲</Option>
<Option value="3">同事丙</Option> <Option value="2">同事乙</Option>
</Select> <Option value="3">同事丙</Option>
)} </Select>
)}
</FormItem>
</div> </div>
</FormItem> </FormItem>
<FormItem {...submitFormLayout} style={{ marginTop: 32 }}> <FormItem {...submitFormLayout} style={{ marginTop: 32 }}>
......
...@@ -59,6 +59,9 @@ export default class TableList extends PureComponent { ...@@ -59,6 +59,9 @@ export default class TableList extends PureComponent {
handleFormReset = () => { handleFormReset = () => {
const { form, dispatch } = this.props; const { form, dispatch } = this.props;
form.resetFields(); form.resetFields();
this.setState({
formValues: {},
});
dispatch({ dispatch({
type: 'rule/fetch', type: 'rule/fetch',
payload: {}, payload: {},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment