New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-select-2z

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-select-2z

React select2 (Hooks). (Customize html for multi-select)

latest
Source
npmnpm
Version
0.2.5-samd
Version published
Maintainers
1
Created
Source

react-select-2z

LIVE EXAMPLE

Description

  • React select2. Basic with multi choice. (Cutomize template option)

  • Apply perfect-scrollbar

Usage

npm install react-select-2z

Import the module in the place you want to use:


// import main.js
import 'select2/dist/js/select2.min.js'
import 'select2/dist/css/select2.min.css'
import 'perfect-scrollbar/css/perfect-scrollbar.css'

// import you component
import ReactSelect2 from 'react-select-2z'
import 'react-select-2z/build/styles.css'

Snippet

    <ReactSelect2
        multiple={true}
        selectedValues={selected}
        options={state}
        // templateOption={templateOption} // customize template (option) (html)
        // templateDisplay={templateDisplay} // customize selected values (html)
        // customCheckSelect={customCheckSelect} // customize check selected
        // customFilterData={customFilterData} // customize check search
        keyLabel='title'
        keyValue='id' // when options = [1, 2, 3, 4...]  (no need keyValue & keyLabel)
        placeholder='Select item'
        // disabled
      />

props

Some main select2 advance checking...

propstypedescription
id
options = []
selectedValues = []
onChange
className
required = false
disabled = false
multiple = false
optionClassName
selectedClassName
maximumSelectionLengthnumberNeed update > 0. Default nolimit
keyLabellist object (key for selected)
keyValuelist object (label for selected)
closeOnSelectbooleanDefault. (False)
placeholder
noFoundDatafuncset text when search no data
noOptionDatafuncset text when no option
onHiddenfunc
select2Config = {}
templateOption
templateDisplay
customCheckSelectfunc
customFilterDatafunc

Something checking! (idea, v.v..)

RUN

LIVE EXAMPLE

npm install
npm run dev
npm run start

License

MIT

Keywords

react

FAQs

Package last updated on 24 Dec 2021

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