react-native-boxes 1.4.59 → 1.4.61
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/Bar.tsx +1 -1
- package/src/Modal.tsx +5 -2
package/package.json
CHANGED
package/src/Bar.tsx
CHANGED
package/src/Modal.tsx
CHANGED
|
@@ -383,7 +383,7 @@ export type DropDownViewProps = {
|
|
|
383
383
|
initialVisile?: Boolean,
|
|
384
384
|
title?: string,
|
|
385
385
|
displayType?: 'button' | 'input',
|
|
386
|
-
onRenderList?: (opt: DropDownViewOption[]) => any,
|
|
386
|
+
onRenderList?: (opt: DropDownViewOption[], onSelect: (selectedId: string, opt: DropDownViewOption) => void) => any,
|
|
387
387
|
onRenderOption?: (opt: DropDownViewOption, setSelected: (selectedId: string, opt: DropDownViewOption) => void) => any,
|
|
388
388
|
onEmptyListPlaceholder?: (dismiss?: () => void) => React.ReactNode
|
|
389
389
|
forceDialogSelectOnWeb?: Boolean
|
|
@@ -554,7 +554,10 @@ export const DropDownView = (props: DropDownViewProps) => {
|
|
|
554
554
|
(
|
|
555
555
|
|
|
556
556
|
props.onRenderList ?
|
|
557
|
-
props.onRenderList(props.options)
|
|
557
|
+
props.onRenderList(props.options, (selectedId: string, opt: DropDownViewOption) => {
|
|
558
|
+
setVisible(false)
|
|
559
|
+
props.onSelect(selectedId, opt)
|
|
560
|
+
}) :
|
|
558
561
|
(
|
|
559
562
|
props.options.map((opt, idx) => {
|
|
560
563
|
if (props.onRenderOption) {
|