
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
react-dropdown-cascade
Advanced tools
A [React](https://reactjs.org) component inpired by [rc-cascader](https://www.npmjs.com/package/rc-cascader), without external dependencies and styled like [material design](https://material.io/design).
A React component inpired by rc-cascader, without external dependencies and styled like material design.
npm install react-dropdown-cascade --save
or
yarn add react-dropdown-cascade
import React, { useState } from 'react';
import DropdownCascade from 'react-dropdown-cascade';
const items = [
{
value: '1',
label: 'Menu 1',
children: [
{
value: '11',
label: 'Another Item'
},
{
value: '12',
label: 'More Items',
children: [
{
value: '121',
label: 'Sub Item A'
},
{
value: '122',
label: 'Sub Item B',
disabled: true
},
{
value: '123',
label: 'Sub Item C'
}
]
}
]
},
{
value: '2',
label: 'Menu 2'
},
{
value: '3',
label: 'Menu 3',
children: [
{
value: '31',
label: 'Hello'
},
{
value: '21',
label: 'World'
}
]
}
];
export default function App() {
const [dropdownValue, setDropdownValue] = useState();
return (
<>
<h1 style={{ margin: 15 }}>react-dropdown-cascade</h1>
<DropdownCascade
customStyles={{
dropdown: {
style: {
margin: '5px 20px 15px 20px'
}
}
}}
items={items}
onSelect={(value, selectedItems) => {
console.log(value, selectedItems);
setDropdownValue(value);
}}
value={dropdownValue}
/>
</>
);
}
Props
Prop | Type | Required | Default | Description |
---|---|---|---|---|
customInput | Component Reference | no | input | This allow supporting custom input |
customInputProps | boolean | no | false | Additional props for custom input |
customStyles | object | no | false | Custom styles |
disabled | boolean | no | false | Pass disabled to input |
expandTrigger | string | no | 'click' | Trigger that shows the dropdown |
fieldNames | object | no | { value: 'value', label: 'label', children: 'children' } | Custom field names for label and value and children |
items | array | yes | The cascade items | |
onSelect | function | no | undefined | Callback with selected value and as 2nd param the items without children |
separatorIcon | string | no | ' > ' | Custom the separator when path labels join until selection |
value | string | no | undefined | The cascade value |
FAQs
A [React](https://reactjs.org) component inpired by [rc-cascader](https://www.npmjs.com/package/rc-cascader), without external dependencies and styled like [material design](https://material.io/design).
We found that react-dropdown-cascade 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.