@@ -60,22 +60,23 @@ function DefaultArrayItem(props) {
60
60
{ props . children }
61
61
</ div >
62
62
63
- { props . hasToolbar &&
63
+ { props . hasToolbar && (
64
64
< div className = "col-xs-3 array-item-toolbox" >
65
65
< div
66
66
className = "btn-group"
67
67
style = { { display : "flex" , justifyContent : "space-around" } } >
68
- { ( props . hasMoveUp || props . hasMoveDown ) &&
68
+ { ( props . hasMoveUp || props . hasMoveDown ) && (
69
69
< IconBtn
70
70
icon = "arrow-up"
71
71
className = "array-item-move-up"
72
72
tabIndex = "-1"
73
73
style = { btnStyle }
74
74
disabled = { props . disabled || props . readonly || ! props . hasMoveUp }
75
75
onClick = { props . onReorderClick ( props . index , props . index - 1 ) }
76
- /> }
76
+ />
77
+ ) }
77
78
78
- { ( props . hasMoveUp || props . hasMoveDown ) &&
79
+ { ( props . hasMoveUp || props . hasMoveDown ) && (
79
80
< IconBtn
80
81
icon = "arrow-down"
81
82
className = "array-item-move-down"
@@ -85,9 +86,10 @@ function DefaultArrayItem(props) {
85
86
props . disabled || props . readonly || ! props . hasMoveDown
86
87
}
87
88
onClick = { props . onReorderClick ( props . index , props . index + 1 ) }
88
- /> }
89
+ />
90
+ ) }
89
91
90
- { props . hasRemove &&
92
+ { props . hasRemove && (
91
93
< IconBtn
92
94
type = "danger"
93
95
icon = "remove"
@@ -96,9 +98,11 @@ function DefaultArrayItem(props) {
96
98
style = { btnStyle }
97
99
disabled = { props . disabled || props . readonly }
98
100
onClick = { props . onDropIndexClick ( props . index ) }
99
- /> }
101
+ />
102
+ ) }
100
103
</ div >
101
- </ div > }
104
+ </ div >
105
+ ) }
102
106
</ div >
103
107
) ;
104
108
}
@@ -114,24 +118,26 @@ function DefaultFixedArrayFieldTemplate(props) {
114
118
required = { props . required }
115
119
/>
116
120
117
- { ( props . uiSchema [ "ui:description" ] || props . schema . description ) &&
121
+ { ( props . uiSchema [ "ui:description" ] || props . schema . description ) && (
118
122
< div
119
123
className = "field-description"
120
124
key = { `field-description-${ props . idSchema . $id } ` } >
121
125
{ props . uiSchema [ "ui:description" ] || props . schema . description }
122
- </ div > }
126
+ </ div >
127
+ ) }
123
128
124
129
< div
125
130
className = "row array-item-list"
126
131
key = { `array-item-list-${ props . idSchema . $id } ` } >
127
132
{ props . items && props . items . map ( DefaultArrayItem ) }
128
133
</ div >
129
134
130
- { props . canAdd &&
135
+ { props . canAdd && (
131
136
< AddButton
132
137
onClick = { props . onAddClick }
133
138
disabled = { props . disabled || props . readonly }
134
- /> }
139
+ />
140
+ ) }
135
141
</ fieldset >
136
142
) ;
137
143
}
@@ -147,27 +153,29 @@ function DefaultNormalArrayFieldTemplate(props) {
147
153
required = { props . required }
148
154
/>
149
155
150
- { ( props . uiSchema [ "ui:description" ] || props . schema . description ) &&
156
+ { ( props . uiSchema [ "ui:description" ] || props . schema . description ) && (
151
157
< ArrayFieldDescription
152
158
key = { `array-field-description-${ props . idSchema . $id } ` }
153
159
DescriptionField = { props . DescriptionField }
154
160
idSchema = { props . idSchema }
155
161
description = {
156
162
props . uiSchema [ "ui:description" ] || props . schema . description
157
163
}
158
- /> }
164
+ />
165
+ ) }
159
166
160
167
< div
161
168
className = "row array-item-list"
162
169
key = { `array-item-list-${ props . idSchema . $id } ` } >
163
170
{ props . items && props . items . map ( p => DefaultArrayItem ( p ) ) }
164
171
</ div >
165
172
166
- { props . canAdd &&
173
+ { props . canAdd && (
167
174
< AddButton
168
175
onClick = { props . onAddClick }
169
176
disabled = { props . disabled || props . readonly }
170
- /> }
177
+ />
178
+ ) }
171
179
</ fieldset >
172
180
) ;
173
181
}
0 commit comments