LIVE PREVIEWBUY FOR $7

Dependent Controls is a library for making dependent drop-downs rapidly and simply. It’s written in pure ES6 JavaScript / TypeScript and doesn’t have any dependencies. The library helps SELECTs, radio buttons, and another customized HTML. Any CSS framework can be utilized for styling.

Dependent Controls Library - 1

Dependent Controls Library - 2


Common Options

  • The library helps SELECT drop-downs, radio buttons, and any customized HTML…
  • Any CSS framework or customized CSS can be utilized for styling.
  • The library is written in fashionable ES6 + TypeScript; no dependencies are required.
  • It has three information supply choices: one JSON file, a direct JavaScript object, or a customized operate that maximizes flexibility and permits to carry out AJAX requests.
  • There may be native storage, session storage, and cookies help.
  • Deep hyperlinks help.
  • In depth documentation is included.
  • It’s potential to have any variety of controls on the identical web page.
  • The person finally defines all look & really feel of the web page; The library has minimal CSS kinds.

Regular Updates


Examples


Information Sources

The library helps three important information sources:

  • Single JSON file. On this case, all information is positioned inside a single JSON file, which is loaded as soon as on web page load.
  • Javascript object. This information supply is the best one. Simply create a JavaScript object and cross it to the library through the dataSource property.
  • Customized operate. The customized operate permits to use any logic and, for instance, carry information from the server-side (through AJAX requests).

The library helps storage to save lots of the present state and restore it after web page refresh or when the again button is pressed.

  • Native storage – that is persistent storage that retains information even when the person closes the browser.
  • Session storage – it will likely be cleared when the browser session is over, usually when the person closes the browser.
  • Cookies – not like native and session storage, cookie values can be utilized on the server too. It’s additionally potential to outline cookies’ expiration date.
  • Deep Hyperlinks – particular hyperlinks that ship customers instantly into the predefined drop-down choice state.


Callbacks & APIs

The library has varied callback operate which may be used to use the customized logic:

  • onSubmit.
  • onReset.
  • onChangeStart.
  • onChangeEnd.
  • onDisableControl.
  • onEnableControl.


Source