1
1
import React , { useEffect , useState } from "react" ;
2
2
import { themeColor } from "../../constant/const" ;
3
3
import ModalUi from "../../primitives/ModalUi" ;
4
+ import { radioButtonWidget } from "../../constant/Utils" ;
4
5
function DropdownWidgetOption ( props ) {
5
6
const [ dropdownOptionList , setDropdownOptionList ] = useState ( [
6
7
"option-1" ,
@@ -143,7 +144,7 @@ function DropdownWidgetOption(props) {
143
144
// styleClass={"dropdownModal"}
144
145
isOpen = { props . showDropdown }
145
146
title = { props . title }
146
- closeOff = { true }
147
+ showClose = { false }
147
148
>
148
149
< div style = { { height : "100%" , padding : 20 } } >
149
150
< form
@@ -153,7 +154,7 @@ function DropdownWidgetOption(props) {
153
154
} }
154
155
>
155
156
< div className = "dropdownContainer" >
156
- { [ "checkbox" , "radio" ] . includes ( props . type ) &&
157
+ { [ "checkbox" , radioButtonWidget ] . includes ( props . type ) &&
157
158
! props . isSignYourself && (
158
159
< div >
159
160
< input
@@ -178,36 +179,6 @@ function DropdownWidgetOption(props) {
178
179
className = "drodown-input"
179
180
/>
180
181
181
- { props . type === "checkbox" && ! props . isSignYourself && (
182
- < >
183
- < label style = { { fontSize : "13px" , fontWeight : "600" } } >
184
- Minimun check
185
- </ label >
186
- < input
187
- required
188
- defaultValue = { 0 }
189
- value = { minCount }
190
- onChange = { ( e ) => {
191
- const count = handleSetMinMax ( e ) ;
192
- setMinCount ( count ) ;
193
- } }
194
- className = "drodown-input"
195
- />
196
- < label style = { { fontSize : "13px" , fontWeight : "600" } } >
197
- Maximum check
198
- </ label >
199
- < input
200
- required
201
- defaultValue = { 0 }
202
- value = { maxCount }
203
- onChange = { ( e ) => {
204
- const count = handleSetMinMax ( e ) ;
205
- setMaxCount ( count ) ;
206
- } }
207
- className = "drodown-input"
208
- />
209
- </ >
210
- ) }
211
182
< label
212
183
style = { { fontSize : "13px" , fontWeight : "600" , marginTop : "5px" } }
213
184
>
@@ -274,7 +245,6 @@ function DropdownWidgetOption(props) {
274
245
> </ i >
275
246
</ div >
276
247
) ) }
277
-
278
248
< i
279
249
onClick = { handleAddInput }
280
250
style = { {
@@ -285,8 +255,38 @@ function DropdownWidgetOption(props) {
285
255
} }
286
256
className = "fa-solid fa-square-plus"
287
257
> </ i >
258
+ { props . type === "checkbox" && ! props . isSignYourself && (
259
+ < >
260
+ < label style = { { fontSize : "13px" , fontWeight : "600" } } >
261
+ Minimun check
262
+ </ label >
263
+ < input
264
+ required
265
+ defaultValue = { 0 }
266
+ value = { minCount }
267
+ onChange = { ( e ) => {
268
+ const count = handleSetMinMax ( e ) ;
269
+ setMinCount ( count ) ;
270
+ } }
271
+ className = "drodown-input"
272
+ />
273
+ < label style = { { fontSize : "13px" , fontWeight : "600" } } >
274
+ Maximum check
275
+ </ label >
276
+ < input
277
+ required
278
+ defaultValue = { 0 }
279
+ value = { maxCount }
280
+ onChange = { ( e ) => {
281
+ const count = handleSetMinMax ( e ) ;
282
+ setMaxCount ( count ) ;
283
+ } }
284
+ className = "drodown-input"
285
+ />
286
+ </ >
287
+ ) }
288
288
</ div >
289
- { [ "dropdown" , "radio" ] . includes ( props . type ) && (
289
+ { [ "dropdown" , radioButtonWidget ] . includes ( props . type ) && (
290
290
< >
291
291
< label
292
292
style = { {
@@ -321,7 +321,7 @@ function DropdownWidgetOption(props) {
321
321
</ select >
322
322
</ >
323
323
) }
324
- { props . type !== "checkbox" && props . type !== "radio" && (
324
+ { props . type !== "checkbox" && props . type !== radioButtonWidget && (
325
325
< >
326
326
< div
327
327
style = { {
0 commit comments