New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-multiselect-dd

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-multiselect-dd

React multiselect dropdown. Support tree structure view, support search on tree, easily customizable according current theme. npm install react-multiselect-dd --save

  • 1.0.2
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

React Multi Select Dropdown

A reactjs multiselect dropdown with search functionality and multiple other options.

Features!

  • Support search on tree view structure
  • Provides options for update UI according current theme

Installation

npm install react-multiselect-dd

Setup :

Import module in your app.module.ts:

import Multiselect from "react-multiselect-dd";
...

<Multiselect
    data={sampleData}
    onChange={getSelected}
    maxLimitOfSelectedItems={2}/>

sampleData format

const sampleData = [
    {
        id: 1,
        title: "First",
        child: [
            {
                id: 2,
                title: "First.1",
                child: [
                    {
                        id: 3,
                        title: "First.1.1"
                    }
                ]
            }
        ]
    },
    {
        id: 4,
        title: "Second",
    },
    ...
];

Other options (optional) :

NameTypeDescriptionRequiredDefault
dataArrayData array that use in multiselect dropdownYes[]
onChangeFunctionCallback function that use for get selected valuesYes
maxLimitOfSelectedItemsNumberMax limit of display selected item in input, after that it will display total selected count.No2
customStyleObjectDetail hereNo
Custom Style

You can update Dropdown style according requirments. Following Custome Styles available:

NameTypeDescriptionDefault
inputHeightNumberUse for set Dropdown input height40
inputWidthNumberUse for set Dropdown input width360
checkedColorStringUse for set checked box checked color'#e6783b'
optionHeightNumberUse for set dropdown option height400

You can pass following options in customStyle props.

<Multiselect
    data={sampleData}
    onChange={getSelected}
    maxLimitOfSelectedItems={2}
    customStyle={{
        'optionHeight': 400,
        'checkedColor': '#e6783b',
        'inputHeight': 40,
        'inputWidth': 360
    }}
/>

License

MIT Licensed. Copyright (c) 2019 sanjay verma

Your contributions and suggestions are always welcome :)

Keywords

FAQs

Package last updated on 30 Jul 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc