Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-autocomplete-input

Package Overview
Dependencies
Maintainers
0
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-autocomplete-input - npm Package Compare versions

Comparing version 5.5.3 to 5.5.4

16

dist/index.d.ts

@@ -1,2 +0,2 @@

import React from 'react';
import React, { ReactElement } from 'react';
import type { FlatListProps, TextInputProps, StyleProp, ViewStyle } from 'react-native';

@@ -14,13 +14,5 @@ export type AutocompleteInputProps<Item> = TextInputProps & {

};
export declare const AutocompleteInput: React.ForwardRefExoticComponent<TextInputProps & {
containerStyle?: StyleProp<ViewStyle>;
hideResults?: boolean;
inputContainerStyle?: StyleProp<ViewStyle>;
listContainerStyle?: StyleProp<ViewStyle>;
onShowResults?: (showResults: boolean) => void;
renderResultList?: React.FC<FlatListProps<unknown>> | undefined;
renderTextInput?: React.FC<TextInputProps>;
flatListProps?: Partial<Omit<FlatListProps<unknown>, "data">> | undefined;
data: readonly unknown[];
} & React.RefAttributes<unknown>>;
export declare const AutocompleteInput: <Item, Ref>(props: AutocompleteInputProps<Item> & {
ref?: React.ForwardedRef<Ref>;
}) => ReactElement;
export default AutocompleteInput;
import React from 'react';
import PropTypes from 'prop-types';
import { FlatList, Platform, StyleSheet, Text, TextInput, View } from 'react-native';
import { ViewPropTypes } from 'deprecated-react-native-prop-types';
function defaultKeyExtractor(_, index) {

@@ -95,54 +93,1 @@ return `key-${index}`;

export default AutocompleteInput;
AutocompleteInput.propTypes = {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
...TextInput.propTypes,
/**
* These styles will be applied to the container which
* surrounds the autocomplete component.
*/
containerStyle: ViewPropTypes ? ViewPropTypes.style : PropTypes.object,
/**
* Assign an array of data objects which should be
* rendered in respect to the entered text.
*/
data: PropTypes.array,
/**
* Props which can be applied to result `FlatList`.
*/
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
flatListProps: FlatList.propTypes || PropTypes.object,
/**
* Set to `true` to hide the suggestion list.
*/
hideResults: PropTypes.bool,
/**
* These styles will be applied to the container which surrounds
* the textInput component.
*/
inputContainerStyle: ViewPropTypes ? ViewPropTypes.style : PropTypes.object,
/**
* These style will be applied to the result list.
*/
listContainerStyle: ViewPropTypes ? ViewPropTypes.style : PropTypes.object,
/**
* `onShowResults` will be called when list is going to
* show/hide results.
*/
onShowResults: PropTypes.func,
/**
* `onShowResults` will be called when list is going to
* show/hide results.
*/
onStartShouldSetResponderCapture: PropTypes.func,
/**
* renders custom TextInput. All props passed to this function.
*/
renderTextInput: PropTypes.func,
/**
* renders custom result list. Can be used to replace FlatList.
* All props passed to this function.
*/
renderResultList: PropTypes.func,
};
{
"name": "react-native-autocomplete-input",
"version": "5.5.3",
"version": "5.5.4",
"description": "Pure javascript autocomplete input for react-native",

@@ -8,5 +8,3 @@ "main": "dist/index.js",

"scripts": {
"test": "npm run lint && npm run testonly",
"lint": "eslint",
"testonly": "jest",
"test": "jest",
"build": "rm -rf dist && tsc --project tsconfig.build.json"

@@ -39,18 +37,10 @@ },

"@testing-library/react-native": "^12.8.1",
"react-test-renderer": "18.3.1",
"@types/jest": "^29.4.0",
"@types/react": "^18.0.28",
"@types/react": "~18.3.12",
"babel-jest": "^29.4.3",
"eslint": "^9.11.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.1",
"jest": "^29.4.3",
"prettier": "^3.3.3",
"react": "^18.3.1",
"react-native": "^0.76.1",
"typescript": "^5.6.2",
"typescript-eslint": "^8.8.0"
},
"dependencies": {
"deprecated-react-native-prop-types": "^5.0.0"
"react": "18.3.1",
"react-native": "0.76.5"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc