修复了【其他配置】循环更新的问题
parent
d6230497c0
commit
02c9127c8f
|
@ -4,11 +4,12 @@ import {ActionType} from "@ant-design/pro-components";
|
|||
import {FormInstance} from "antd/es/form";
|
||||
import Column from "antd/es/table/Column";
|
||||
import RedoOutlined from "@ant-design/icons/lib/icons/RedoOutlined";
|
||||
|
||||
class OtherConfig extends React.Component<any, any> {
|
||||
|
||||
refresh = () => {
|
||||
//TODO: refresh
|
||||
this.setState({forced: true, limit: 0})
|
||||
this.setState({forced: true, limit: 0, activated: true})
|
||||
}
|
||||
submit = () => {
|
||||
//TODO: submit
|
||||
|
@ -27,7 +28,7 @@ class OtherConfig extends React.Component<any, any> {
|
|||
}
|
||||
|
||||
static getDerivedStateFromProps(props: any, state: any) {
|
||||
if (props.activate !== state.activated && typeof state.refresh === "function")
|
||||
if (props.activate && props.activate !== state.activated && typeof state.refresh === "function")
|
||||
state.refresh()
|
||||
return {activated: props.activate};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue