
Security News
Node.js Drops Bug Bounty Rewards After Funding Dries Up
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.
nested-selects-react
Advanced tools
A react component to manage nested <select> tags.
install with npm:
npm i nested-selects-react
install with yarn:
yarn add nested-selects-react
url...
import React, { useState } from 'react';
import { NestedSelects, Select, Option, MakeVisible } from 'nested-selects-react';
function MyForm(){
const [ state, setState ] = useState({
nestedSelectsValues: null
});
// to get the <Select>'s data
const getValues = data => setState({ ...state, nestedSelectsValues: data });
const handleSubmit = ev => {
ev.preventDefault();
console.log(state);
}
return(
<form onSubmit={() => false}>
{/* nested-selects-react code */}
<NestedSelects getvalues={getValues}>
{/* first principal select */}
<Select name="first-select" label="first select">
<Option value="sel1-option1">sel1 option 1</Option>
<Option value="sel1-option2">sel1 option 2</Option>
</Select>
{/* second principal select */}
<Select name="second-select" label="first select">
<Option value="sel2-option1">sel2 option 1</Option>
{/* trigger option */}
<Option value="sel2-option2">
sel2 option 2 trigger
<MakeVisible>
<Select name="sub-select" label="Wow! check this out, a sub select!">
<Option value="sub-sel-option1">option 1</Option>
<Option value="sub-sel-option1">option 2</Option>
</Select>
</MakeVisible>
</Option>
</Select>
</NestedSelects>
<button type="button" onClick={handleSubmit}>save</button>
</form>
)
}
export default MyForm;
nested-selects-react comes without styles. If you want to add styles please check docs. it's very easy url...
MIT © carlosEdua
Powered by create-react-library
FAQs
A react component to manage nested <select> tags
We found that nested-selects-react 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
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.