1.1.1 • Published 6 months ago

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

Weekly downloads
-
License
-
Repository
github
Last release
6 months 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

6 months ago

1.0.10

6 months ago

1.0.9

6 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago