
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
pcln-autocomplete
Advanced tools
Composable React autocomplete component built with Downshift
npm i pcln-autocomplete
import React from 'react'
import { Autocomplete } from 'pcln-autocomplete'
import { Icon, Text } from 'pcln-design-system'
export default props =>
<Autocomplete
match={(item, value) => item.includes(value)}
onChange={item => {
props.onChange(item)
}}>
<Autocomplete.Label>
Location
</Autocomplete.Label>
<Autocomplete.Input />
<Autocomplete.Menu>
{props.locations.map(location => (
<Autocomplete.Item
key={location.name}
item={location}>
<Icon
name='pin'
mr={2}
color='blue'
/>
<Text fontSize={0}>
{location.name}
</Text>
</Autocomplete.Item>
))
</Autocomplete.Menu>
</Autocomplete>
Note: <Autocomplete>
relies on values from theme
, so it must be a descendent of <ThemeProvider>
in order to work properly. Otherwise, you might experience errors like this:
Uncaught TypeError: Cannot read property '3' of undefined
All components can be imported by name and subcomponents are provided as static properties on the Autocomplete
component.
Wrapper for Downshift component with additional match
prop.
Prop | Type | Description |
---|---|---|
match | function | Filters direct children of the Menu component |
itemToString | function | Used to determine the string value for the selected item (shown in the input value) |
onChange | function | Called when the user selects an item and the selected item has changed. Called with the item that was selected and the new state of downshift |
For additional props, see the Downshift documentation.
Design system Label
component with additional default props provided by Downshift for accessibility.
Design system Input
component with additional default props provided by Downshift for accessibility.
Design system Card
component with styles and default props to work with Downshift.
Design system Flex
component with styles and default props to work with Downshift.
FormField
FAQs
React autocomplete component built with Downshift
The npm package pcln-autocomplete receives a total of 252 weekly downloads. As such, pcln-autocomplete popularity was classified as not popular.
We found that pcln-autocomplete demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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 researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.