native-pytech 1.0.76 → 1.0.78

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.
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import type Props from './types';
3
- declare const _default: React.MemoExoticComponent<({ children, selectedValue, onSelectionChange, adjustRowInsets }: Props) => React.JSX.Element>;
3
+ declare const _default: React.MemoExoticComponent<({ children, selected, onSelectionChange, adjustRowInsets }: Props) => React.JSX.Element>;
4
4
  export default _default;
@@ -2,7 +2,7 @@ import { Host, Section, Picker } from '@expo/ui/swift-ui';
2
2
  import { listRowInsets, listStyle, pickerStyle } from '@expo/ui/swift-ui/modifiers';
3
3
  import React, { memo, useMemo } from 'react';
4
4
  import { List } from "../../../../libs/swiftui";
5
- export default memo(({ children, selectedValue, onSelectionChange, adjustRowInsets }) => {
5
+ export default memo(({ children, selected, onSelectionChange, adjustRowInsets }) => {
6
6
  const _modifiersPicker = useMemo(() => [
7
7
  pickerStyle('inline'),
8
8
  ...(adjustRowInsets ? [listRowInsets({ top: 20, bottom: 20, leading: 25, trailing: 20 })] : []),
@@ -10,7 +10,7 @@ export default memo(({ children, selectedValue, onSelectionChange, adjustRowInse
10
10
  return (<Host style={{ flex: 1 }}>
11
11
  <List modifiers={[listStyle('inset')]} disablePaddingTop>
12
12
  <Section>
13
- <Picker selection={selectedValue} onSelectionChange={onSelectionChange} modifiers={_modifiersPicker}>
13
+ <Picker selection={selected} onSelectionChange={onSelectionChange} modifiers={_modifiersPicker}>
14
14
  {children}
15
15
  </Picker>
16
16
  </Section>
@@ -3,8 +3,8 @@ import React, { memo } from "react";
3
3
  import Content from '../Content';
4
4
  export default memo(({ children, onChangeSearchText, onSelectionChange, ...props }) => {
5
5
  const router = useRouter();
6
- const _onSelectionChange = (selection) => {
7
- onSelectionChange?.(selection);
6
+ const _onSelectionChange = async (selection) => {
7
+ await onSelectionChange?.(selection);
8
8
  router.back();
9
9
  };
10
10
  return (<>
@@ -6,7 +6,7 @@ type Props = {
6
6
  /**
7
7
  Selected value.
8
8
  */
9
- selectedValue?: string;
9
+ selected?: string;
10
10
  /**
11
11
  Function to be called when the user changes the search text.
12
12
  */
@@ -14,7 +14,7 @@ type Props = {
14
14
  /**
15
15
  Function to be called when the user selects a selection.
16
16
  */
17
- onSelectionChange?: (selection: string) => void;
17
+ onSelectionChange?: (selection: string) => void | Promise<void>;
18
18
  /**
19
19
  Adjusts the row insets on ios.
20
20
  Is is useful when uses items with gradients.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-pytech",
3
- "version": "1.0.76",
3
+ "version": "1.0.78",
4
4
  "description": "Libreria de React Native Pytech",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",