Skip to content

Commit 8d5409a

Browse files
committed
[type:fix] fix gray
1 parent 818a1da commit 8d5409a

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/routes/Plugin/Discovery/DiscoveryUpstreamTable.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import {
2424
InputNumber,
2525
Popconfirm,
2626
Select,
27-
Table,
2827
Switch,
28+
Table,
2929
} from "antd";
3030
import { getIntlContent } from "../../../utils/IntlUtils";
3131

@@ -67,24 +67,24 @@ class EditableCell extends Component {
6767
<Form.Item style={{ margin: 0 }}>
6868
{dataIndex === "gray"
6969
? getFieldDecorator(dataIndex, {
70-
rules: [
71-
{
72-
required: true,
73-
message: `Please Input ${title}!`,
74-
},
75-
],
76-
valuePropName: "checked",
77-
initialValue: record[dataIndex],
78-
})(this.getInput())
70+
rules: [
71+
{
72+
required: true,
73+
message: `Please Input ${title}!`,
74+
},
75+
],
76+
valuePropName: "checked",
77+
initialValue: record[dataIndex],
78+
})(this.getInput())
7979
: getFieldDecorator(dataIndex, {
80-
rules: [
81-
{
82-
required: true,
83-
message: `Please Input ${title}!`,
84-
},
85-
],
86-
initialValue: record[dataIndex],
87-
})(this.getInput())}
80+
rules: [
81+
{
82+
required: true,
83+
message: `Please Input ${title}!`,
84+
},
85+
],
86+
initialValue: record[dataIndex],
87+
})(this.getInput())}
8888
</Form.Item>
8989
) : (
9090
children
@@ -158,7 +158,7 @@ class EditableTable extends Component {
158158
render: (text, record) => {
159159
return (
160160
<Switch
161-
checked={Boolean(record.gray)}
161+
checked={record.gray === "true" || record.gray === true}
162162
onChange={(v) => {
163163
record.gray = v;
164164
this.saveGray(record, record.key);

0 commit comments

Comments
 (0)