
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
searchable-dropdown-react-native
Advanced tools
Searchable Dropdown in react native, usable with Expo. Allow you to handle single and multiple selections.
npm install --save searchable-dropdown-react-native
Name | Description | Type | Default | Required |
---|---|---|---|---|
options | The options for the component. | array | Yes | |
selectedValues | The values currently selected. | array | Yes | |
setSelectedValues | The callback to handle the selection of items | func | Yes | |
label | The label of the dropdown | string | No | |
placeholder | Default text to be shown to the user | string | 'Select an item' | No |
inputSize | Size of the input. | number | 150 | No |
addNewElementText | The text that will be shown to add a new element is the options. | string | Add an item | No |
rightIcon | The icon on the right of the input (if you want one). | any | No | |
selectedElementColor | Color of the selected items. | string | No | |
labelStyle | Additional styles for the label. | object | {} | No |
containerStyle | Additional styles for the container view. | object | {} | No |
itemStyle | Additional styles for the items. | object | {} | No |
labelStyle | Additional styles for the labels. | object | {} | No |
inputContainerStyle | Additional styles for the input container. | object | {} | No |
inputColor | The color of the input. | string | No |
import React, { useState } from "react";
import SearchableDropdown from "searchable-dropdown-react-native";
let items = [
{
id: 1,
name: "JavaScript",
value: "JavaScript"
},
{
id: 2,
name: "Java",
value: "Java"
},
{
id: 3,
name: "Ruby",
value: "Ruby"
},
{
id: 4,
name: "React Native",
value: "React Native"
},
{
id: 5,
name: "PHP",
value: "PHP"
},
{
id: 6,
name: "Python",
value: "Python"
},
{
id: 7,
name: "Go",
value: "Go"
},
{
id: 8,
name: "Swift",
value: "Swift"
}
];
export default function App() {
const [selectedValues, setSelectedValues] = useState([]);
return (
<SearchableDropdown
options={items}
selectedValues={selectedValues}
setSelectedValues={setSelectedValues}
label="test dropdown"
placeholder="Test placeholder"
inputSize={300}
/>
);
}
FAQs
A searchable dropdown in React Native.
The npm package searchable-dropdown-react-native receives a total of 2 weekly downloads. As such, searchable-dropdown-react-native popularity was classified as not popular.
We found that searchable-dropdown-react-native demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.