8
8
Input ,
9
9
Row ,
10
10
Tooltip ,
11
+ Checkbox ,
12
+ InputNumber ,
11
13
} from "antd" ;
12
14
import {
13
15
InfoCircleOutlined ,
@@ -117,15 +119,9 @@ export const ArrayField = ({
117
119
onClick = { ( ) => remove ( arrField . name ) }
118
120
/>
119
121
</ Row >
120
- { arrFields !== null &&
121
- arrFields !== undefined &&
122
- index + 1 === arrFields . length ? (
123
- < Divider
124
- style = { { marginTop : "4px" , marginBottom : "12px" } }
125
- />
126
- ) : (
127
- < > </ >
128
- ) }
122
+ { index + 1 === arrFields . length ? (
123
+ < Divider style = { { marginTop : "4px" , marginBottom : "12px" } } />
124
+ ) : null }
129
125
</ Col >
130
126
) ) }
131
127
< Form . Item style = { { marginBottom : "0" } } >
@@ -144,6 +140,35 @@ export const ArrayField = ({
144
140
</ Form . Item >
145
141
) ;
146
142
}
143
+
144
+ if ( field . items . type === "number" ) {
145
+ return (
146
+ < Form . Item
147
+ wrapperCol = { { span : 16 } }
148
+ name = { fieldName }
149
+ label = { field . display_name }
150
+ style = { { marginBottom : "12px" } }
151
+ >
152
+ < InputNumber disabled = { field . immutable && isModuleEdit } />
153
+ </ Form . Item >
154
+ ) ;
155
+ }
156
+
157
+ if ( field . items . type === "boolean" ) {
158
+ return (
159
+ < Form . Item
160
+ wrapperCol = { { span : 16 } }
161
+ name = { fieldName }
162
+ valuePropName = "checked"
163
+ style = { { marginBottom : "12px" } }
164
+ >
165
+ < Checkbox disabled = { field . immutable && isModuleEdit } >
166
+ { field . display_name }
167
+ </ Checkbox >
168
+ </ Form . Item >
169
+ ) ;
170
+ }
171
+
147
172
if ( field . items . type === "object" ) {
148
173
return (
149
174
< Collapse
@@ -162,11 +187,11 @@ export const ArrayField = ({
162
187
} }
163
188
forceRender = { true }
164
189
>
165
- < Form . Item
166
- wrapperCol = { { span : 16 } }
167
- style = { {
168
- paddingTop : "8px" ,
169
- marginBottom : "0" ,
190
+ < Form . Item
191
+ wrapperCol = { { span : 16 } }
192
+ style = { {
193
+ paddingTop : "8px" ,
194
+ marginBottom : "0" ,
170
195
} }
171
196
>
172
197
< Form . List name = { formItemName } >
0 commit comments