Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-native-select-dropdown-with-search
Advanced tools
react-native-select-dropdown-with-search is a highly customized dropdown | select | picker | menu for react native that works for andriod and iOS platforms.
npm i react-native-select-dropdown-with-search is a highly customized dropdown | select | picker | menu with the possibility to search the values. It's made for react native that works for andriod and iOS platforms.
npm install npm i react-native-select-dropdown-with-search
yarn add npm i react-native-select-dropdown-with-search
import SelectDropdownWithSearch from 'npm i react-native-select-dropdown-with-search'
...
const countries = ["Egypt", "Canada", "Australia", "Ireland"]
...
<SelectDropdownWithSearch
data={countries}
onSelect={(selectedItem, index) => {
console.log(selectedItem, index)
}}
buttonTextAfterSelection={(selectedItem, index) => {
// text represented after item is selected
// if data array is an array of objects then return selectedItem.property to render after item is selected
return selectedItem
}}
rowTextForSelection={(item, index) => {
// text represented for each item in dropdown
// if data array is an array of objects then return item.property to represent item in dropdown
return item
}}
/>
array of data that will be represented in dropdown 'can be array of objects
Type | Required |
---|---|
array | Yes |
function recieves selected item and its index in data array
Type | Required |
---|---|
function | Yes |
default button text when no item is selected
Type | Required |
---|---|
String | No |
function recieves selected item and its index, this function should return a string that will be represented in button after item is selected
Type | Required |
---|---|
function | Yes "unless you customized button using renderCustomizedButtonChild" |
function recieves item and index for each row in dropdown, this function shoud return a string that will be represented in each row in dropdown
Type | Required |
---|---|
function | Yes "unless you customized button using renderCustomizedRowChild" |
default selected item in dropdown ( check examples in Demo1)
Type | Required |
---|---|
any | No |
default selected item index
Type | Required |
---|---|
integer | No |
disable dropdown
Type | Required |
---|---|
boolean | No |
disable auto scroll to selected value
Type | Required |
---|---|
boolean | No |
function fires when dropdown is opened
Type | Required |
---|---|
function | No |
function fires when dropdown is closed
Type | Required |
---|---|
function | No |
style object for button
Type | Required |
---|---|
object | Yes |
style object for button text
Type | Required |
---|---|
object | No |
function recieves selected item and its index, this function should return a React component as a child for dropdown button buttonStyle
should be used for parent button view style.
Type | Required |
---|---|
function | No |
function that should return a React component for dropdown icon
Type | Required |
---|---|
function | No |
dropdown icon position "left" || "right"
Type | Required |
---|---|
string | No |
required to set true when statusbar is translucent (android only)
Type | Required |
---|---|
boolean | No |
style object for dropdown view
Type | Required |
---|---|
object | No |
backdrop color when dropdown is opened
Type | Required |
---|---|
string | No |
background color behind list items when dropdown is opened
Type | Required |
---|---|
string | No |
style object for row
Type | Required |
---|---|
object | Yes |
style object for row text
Type | Required |
---|---|
object | No |
function recieves item and its index, this function should return React component as a child for customized row rowStyle
should be used for parent row view style.
Type | Required |
---|---|
function | No |
Method | Description |
---|---|
reset() | Remove selection & reset it to display defaultButtonText check https://github.com/AdelRedaa97/npm i react-native-select-dropdown-with-search/pull/1#issuecomment-818307624. |
openDropdown() | Open the dropdown. |
closeDropdown() | Close the dropdown. |
FAQs
react-native-select-dropdown-with-search is a highly customized dropdown | select | picker | menu for react native that works for andriod and iOS platforms.
We found that react-native-select-dropdown-with-search 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.