@@ -24,8 +24,8 @@ import {
2424 InputNumber ,
2525 Popconfirm ,
2626 Select ,
27- Table ,
2827 Switch ,
28+ Table ,
2929} from "antd" ;
3030import { 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