
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@idot-digital/dropdown-selector
Advanced tools
Dropdown offers the possibility to filter for errors in various ways and type in either custom values or search for existing in the list below it
A complete rework of the Select component from @material-ui/core
Pass MenuItems, ListSubheaders, etc. as you would using Select
Dropdown offers the possibility to filter for errors in various ways and type in either custom values or search for existing in the list below it.
npm install --save @idot-digital/dropdown-selector
yarn add @idot-digital/dropdown-selector
Dropdown should be wrapped inside DropdownWrapper in order to ensure no clipping issues inside "overflow: 'hidden'" containers as shown below. Positioning as "position: 'relative'" inside such containers will break the overlaying search.
Dropdown is using TextField from @material-ui/core. Additional props and settings can be found here https://material-ui.com/components/text-fields/
Children of Dropdown are equal to Select from @material-ui/core. An example is listed below. Additional props and settings can be found here https://material-ui.com/components/selects/
import React from 'react'
import Dropdown, {
Content,
DropdownWrapper
} from '@idot-digital/dropdown-selector'
import { ListItemText, ListSubheader, MenuItem } from '@material-ui/core'
const App = () => {
const [search, setSearch] = React.useState('initial value') // Either use internal or external search state for input
return (
<DropdownWrapper>
<div
className='scrolling component where Dropdown could be clipped'
style={{ height: '2000px' }}
>
<div className='other components' style={{ height: '1000px' }}></div>
<div
className='wrapping component with overflow hidden'
style={{
overflow: 'hidden',
position: 'unset', // Settings position to relative, absolute or fixed will break the dropdown
height: '200px',
width: '200px'
}}
>
<Dropdown
value={search}
onChange={(value) => setSearch(() => value)}
onChangeDone={(selection: Content) => console.log(selection)} // Callback when blured or picked
notEmpty // First element of content will be selected
overwriteSearchOnError // Overwrites search on onChangeDone when an error occurs
allowCustomInputs // Various error states
errorOnEmpty
errorAtStartup
errorWhileFocused
>
<ListSubheader>First</ListSubheader>
{['LongTextThatIsTotallyClipped', 'First', 'Second', 'Third'].map(
// value must be passed as a string at the root menu element. Otherwise the item will be ignored
(item) => (
<MenuItem value={item as string} key={item}>
<ListItemText primary={item} />
</MenuItem>
)
)}
<ListSubheader>Second</ListSubheader>
<MenuItem value='some other value that is filtered'>
Manual
</MenuItem>
</Dropdown>
</div>
</div>
</DropdownWrapper>
)
}
UNLICENSED © @idot-digital
FAQs
Dropdown offers the possibility to filter for errors in various ways and type in either custom values or search for existing in the list below it
We found that @idot-digital/dropdown-selector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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 uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.