react-native-boxes 1.4.36 → 1.4.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Modal.tsx +42 -24
package/package.json
CHANGED
package/src/Modal.tsx
CHANGED
|
@@ -406,32 +406,49 @@ export const DropDownView = (props: DropDownViewProps) => {
|
|
|
406
406
|
const shouldShowLabel = props.listType == 'horizontal-list' ? !visible : true
|
|
407
407
|
if (Platform.OS == 'web' && !props.forceDialogSelectOnWeb) {
|
|
408
408
|
return (
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
409
|
+
<>
|
|
410
|
+
<select
|
|
411
|
+
value={props.selectedId}
|
|
412
|
+
defaultValue={props.selectedId}
|
|
413
|
+
onChange={(e) => {
|
|
414
|
+
//@ts-ignore
|
|
415
|
+
props.onSelect(e.target.value, props.options.find(o => o.id == e.target.value))
|
|
416
|
+
}}
|
|
412
417
|
//@ts-ignore
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
418
|
+
style={Object.assign({
|
|
419
|
+
color: theme.colors.text,
|
|
420
|
+
backgroundColor: theme.colors.background,
|
|
421
|
+
padding: theme.dimens.space.lg,
|
|
422
|
+
margin: theme.dimens.space.md,
|
|
423
|
+
paddingStart: theme.dimens.space.sm,
|
|
424
|
+
borderWidth: 1.5,
|
|
425
|
+
borderRadius: theme.dimens.space.sm,
|
|
426
|
+
borderColor: theme.colors.caption,
|
|
427
|
+
}, props.style || {})}>
|
|
428
|
+
<optgroup>
|
|
429
|
+
|
|
430
|
+
{
|
|
431
|
+
props.options.map(opt => {
|
|
432
|
+
if (props.onRenderOption) {
|
|
433
|
+
return props.onRenderOption(opt, onSelect)
|
|
434
|
+
}
|
|
435
|
+
return (
|
|
436
|
+
<option
|
|
437
|
+
style={{
|
|
438
|
+
fontFamily: theme.fonts.Regular,
|
|
439
|
+
backgroundColor: theme.colors.background,
|
|
440
|
+
color: theme.colors.text,
|
|
441
|
+
padding: theme.dimens.space.md,
|
|
442
|
+
paddingTop: theme.dimens.space.lg,
|
|
443
|
+
paddingBottom: theme.dimens.space.lg,
|
|
444
|
+
}}
|
|
445
|
+
key={opt.id} id={opt.id} value={opt.id}>{opt.title || opt.value}</option>
|
|
446
|
+
)
|
|
447
|
+
})
|
|
424
448
|
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
padding: theme.dimens.space.md,
|
|
429
|
-
}}
|
|
430
|
-
key={opt.id} id={opt.id} value={opt.id}>{opt.title || opt.value}</option>
|
|
431
|
-
)
|
|
432
|
-
})
|
|
433
|
-
}
|
|
434
|
-
</select>
|
|
449
|
+
</optgroup>
|
|
450
|
+
</select>
|
|
451
|
+
</>
|
|
435
452
|
)
|
|
436
453
|
}
|
|
437
454
|
else {
|
|
@@ -577,6 +594,7 @@ export const DropDownView = (props: DropDownViewProps) => {
|
|
|
577
594
|
}
|
|
578
595
|
|
|
579
596
|
|
|
597
|
+
|
|
580
598
|
export type ConfirmationDialogProps = {
|
|
581
599
|
visible: boolean,
|
|
582
600
|
title?: string | React.Component,
|