react-native-actions-sheet-picker
Version:
A React Native component that provides a filterable select dropdown/picker.
28 lines (27 loc) • 872 B
TypeScript
/// <reference types="react" />
import type { FlatListProps, TextInputProps } from 'react-native';
import type { ActionSheetProps } from 'react-native-actions-sheet';
declare type RenderItemProp<T> = {
renderListItem: (item: T, index: number) => React.ReactElement;
};
export declare type PickerProps<T> = {
id: string;
data: T[];
placeholderText?: string;
searchable?: boolean;
onSearch?: (value: string) => void;
label?: string;
placeholderTextColor?: string;
closeText?: string;
setSelected: (value: T) => void;
loading?: boolean;
height?: number;
inputValue?: string;
noDataFoundText?: string;
searchInputProps?: TextInputProps;
flatListProps?: FlatListProps<T>;
actionsSheetProps?: ActionSheetProps;
} & (T extends {
name: string;
} ? Partial<RenderItemProp<T>> : RenderItemProp<T>);
export {};