react-native-auto-positioned-popup 1.2.19 → 1.2.21

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,8 +1,8 @@
1
- import React, {RefObject} from 'react';
2
- import {StyleProp, TextInputProps, TextStyle, ViewStyle} from 'react-native';
3
- import {TextInputSubmitEditingEventData} from 'react-native/Libraries/Components/TextInput/TextInput';
4
- import {NativeSyntheticEvent} from 'react-native/Libraries/Types/CoreEventTypes';
5
- import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view';
1
+ import React, { RefObject } from 'react';
2
+ import { StyleProp, TextInputProps, TextStyle, ViewStyle } from 'react-native';
3
+ import { TextInputSubmitEditingEventData } from 'react-native/Libraries/Components/TextInput/TextInput';
4
+ import { NativeSyntheticEvent } from 'react-native/Libraries/Types/CoreEventTypes';
5
+ import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
6
6
 
7
7
  export interface SelectedItem {
8
8
  id: string;
@@ -22,7 +22,7 @@ export interface Data {
22
22
  export interface RNAutoPositionedPopupCustomRowProps {
23
23
  children?: React.ReactNode;
24
24
  selectedItem?: SelectedItem | any | null | undefined;
25
- selectList?: string | any [];
25
+ selectList?: string | any[];
26
26
  onAdded?: (textToAdd: string) => void;
27
27
  clearSelectedItem?: () => void;
28
28
  disabled?: boolean;
@@ -64,15 +64,15 @@ export interface AutoPositionedPopupProps {
64
64
  * @param searchQuery
65
65
  */
66
66
  fetchData?: ({
67
- pageIndex,
68
- pageSize,
69
- searchQuery,
70
- }: {
67
+ pageIndex,
68
+ pageSize,
69
+ searchQuery,
70
+ }: {
71
71
  pageIndex: number;
72
72
  pageSize: number;
73
73
  searchQuery?: string;
74
74
  }) => Promise<Data | null>;
75
- renderItem?: ({item, index}: { item: SelectedItem; index: number }) => React.ReactElement;
75
+ renderItem?: ({ item, index }: { item: SelectedItem; index: number }) => React.ReactElement;
76
76
  onItemSelected?: (item: SelectedItem & any) => void;
77
77
  /**
78
78
  * onSubmitEditing={(e: NativeSyntheticEvent<TextInputSubmitEditingEventData>) => {
@@ -157,9 +157,9 @@ export interface AutoPositionedPopupProps {
157
157
  */
158
158
  CustomPopView?: () => React.ComponentType<
159
159
  ViewStyle & {
160
- children?: React.ReactNode;
161
- selectedItem?: SelectedItem | any;
162
- }
160
+ children?: React.ReactNode;
161
+ selectedItem?: SelectedItem | any;
162
+ }
163
163
  >;
164
164
  CustomPopViewStyle?: ViewStyle;
165
165
  forceRemoveAllRootViewOnItemSelected?: boolean;
@@ -210,4 +210,6 @@ export interface AutoPositionedPopupProps {
210
210
  * Default: 100
211
211
  */
212
212
  scrollExtraHeight?: number;
213
+ // 是否在 AutoPositionedPopupList 组件内部就行搜索
214
+ internalSearch?: boolean;
213
215
  }