update query-table

This commit is contained in:
2021-06-15 17:41:38 +08:00
parent fcb1062402
commit fb9d7573b1

View File

@@ -144,7 +144,9 @@ export default class QueryTable extends Component {
*/
onResetQuery() {
this.form.current.resetFields()
this.query = {}
this.query = {
...this.props.queryInitialValues
}
this.onReloadData(true)
}
@@ -191,6 +193,7 @@ export default class QueryTable extends Component {
layout="inline"
ref={this.form}
onFinish={(value) => this.onQuery(value)}
initialValues={this.props.queryInitialValues}
>
{query}
<Form.Item>
@@ -221,7 +224,7 @@ export default class QueryTable extends Component {
bordered: true,
size: 'middle',
rowKey: record => record.id || Math.random().toString(16).slice(2),
scroll: { x: 'max-content' }
...this.props
}
const on = {