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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-boxes",
3
- "version": "1.4.59",
3
+ "version": "1.4.61",
4
4
  "description": "A react native library for rapid development of UI using boxes",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/Bar.tsx CHANGED
@@ -106,7 +106,7 @@ export function SimpleToolbar(props: SimpleToolbarProps) {
106
106
  return (
107
107
  <PressableView
108
108
  style={{
109
- paddingStart: theme.dimens.space.md
109
+ padding: theme.dimens.space.md
110
110
  }}
111
111
  key={opt.id}
112
112
  accessibilityHint={title}
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) {