react-native-boxes 1.4.35 → 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 -25
package/package.json
CHANGED
package/src/Modal.tsx
CHANGED
|
@@ -406,33 +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
|
-
props.
|
|
423
|
-
|
|
424
|
-
|
|
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
|
+
})
|
|
425
448
|
}
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
padding: theme.dimens.space.md,
|
|
430
|
-
}}
|
|
431
|
-
key={opt.id} id={opt.id} value={opt.id}>{opt.title || opt.value}</option>
|
|
432
|
-
)
|
|
433
|
-
})
|
|
434
|
-
}
|
|
435
|
-
</select>
|
|
449
|
+
</optgroup>
|
|
450
|
+
</select>
|
|
451
|
+
</>
|
|
436
452
|
)
|
|
437
453
|
}
|
|
438
454
|
else {
|
|
@@ -578,6 +594,7 @@ export const DropDownView = (props: DropDownViewProps) => {
|
|
|
578
594
|
}
|
|
579
595
|
|
|
580
596
|
|
|
597
|
+
|
|
581
598
|
export type ConfirmationDialogProps = {
|
|
582
599
|
visible: boolean,
|
|
583
600
|
title?: string | React.Component,
|