New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dependent-select-boxes

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dependent-select-boxes

Allows a child select box to change its options dependent on its parent select box

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-62.5%
Maintainers
1
Weekly downloads
 
Created
Source

dependent-select-boxes

dependent-select-boxes allows a child select box to change its options dependent on its parent select box.

Demo

Additional options

You can pass in options as a third parameter. The currently supported options are:

  • childOptionIsDependentOnParentOption(childOption, parentOption): Function that determines if the childOptionshould be displayed if parentOption is selected. Default: true if the value of the parent option is a prefix of the value of the child option, else false.
  • resetParentOptionOnEmptyChildOption: Resets the parent option to an empty value if the child option changes to an empty option. Default true.
new DependentSelectBoxes(document.getElementById('parent'), document.getElementById('child'), {
  childOptionIsDependentOnParentOption(childOption, parentOption) {
    ...
  },
  resetParentOptionOnEmptyChildOption: false,
});

You can configure the default options by setting them via:

import { setDefaultOptions } from 'dependent-select-boxes';

setDefaultOptions({
  ...
});

Node

// npm install dependent-select-boxes --save
import DependentSelectBoxes from 'dependent-select-boxes';

const dependentSelectBoxes = new DependentSelectBoxes(parent, child, options);

Contributing

If you would like to submit a pull request with any changes you make, please feel free! Simply run npm test to test and npm start to compile before submitting pull requests.

Issues

Please use the GitHub issue tracker to raise any problems or feature requests.

Keywords

FAQs

Package last updated on 15 Apr 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc