1.1.1 • Published 2 years ago

lt-dropdown-menu-jquery-to-react v1.1.1

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

lt-dropdown-menu-jquery-to-react

Get a conversion from jQuery DropDown Menu to React (JSX) ! https://github.com/jquery/jquery-ui/blob/master/ui/widgets/selectmenu.js

Installation

nodejs is required min v17 into your computer and you will use React min V.17 with this component !

# using npm
npm install lt-dropdown-menu-jquery-to-react

# using yarn
yarn add lt-dropdown-menu-jquery-to-react

Usage into React

# using import
import { DropDownSelect } from 'lt-dropdown-menu-jquery-to-react';

Example

Using promises:

<DropDownSelect
    className={"form-group"}
    id={"state"}
    title={"State"}
    dataArray={dataStates}
    keyToWatch={"name"}
    keyToValue={"abbreviation"}
    keyToValueDefaultValue={"AL"}
/>

Require differents Props :

  • className : Apply class Css for component
  • id : id to search into DOM result of the select tag.
  • title : text of the label tag
  • dataArray : array of objects (ex : {"name" : "x", "value": "y"},{"name" : "a", "value": "b"} ),
  • keyToWatch : key of object to assign into text of the option tag into select tag.
  • keyToValue : key of object to assign into value the option tag into select tag.
  • keyToValueDefaultValue : select default value of the option selected tag into select tag on launch of composant
1.1.1

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago