JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q39512F
  • License MIT

lightweight react dropdown with input

Package Exports

  • lw-react-dropdown

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (lw-react-dropdown) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

README

This is a self contained react dropdown/input component. It does not use bootstrap and is self contained.

How do I get set up?

  • @ dev stage

Usage

Current component options (pass as props):

  • initVal: optional - initial value for input field. default is empty string
  • filterOptions: wether to filter options based on input field value
  • filterFunc optional - default checks if val is part of option
  • optionsPosition: position of the options dropdown list. 'bottom' and 'top' are supported
  • options: list of options for the dropdown list
  • selectCallback: function to be triggered when user selects an option. Default prints a message to console
  • inputChangeCallback: default false
  • debounceMillisecs: debounce time for the input callback function (if set)

future options:

  • css animations: add css animations for smooth dropdown collapse/expand
  • options position: add extra options 'left', 'right', 'auto'(based on distance to window edge?)

ToDo:

  • add test cases