anil-coustom-react-select
v1.0.7
Published
```javascript import { MySelectAll, Option, MultiValue, ValueContainer } from 'anil-coustom-react-select';
Downloads
20
Readme
Anil Coustom React-Select.
CheckBox with Label, Select All and FirstTwoOptions +2more
import {
MySelectAll,
Option,
MultiValue,
ValueContainer
} from 'anil-coustom-react-select';
<MySelectAll
allOption={{
label: "Select All",
value: 0
}}
allowSelectAll={true/false}
components={{ Option, MultiValue, ValueContainer }}
// refer also React-Select to UnderStanding below Code
isMulti
isSearchable
options={branchMapData}
value={values.branches}
getOptionLabel={option => option.label}
getOptionValue={option => option.value}
onChange={e => this.handleChange(e)}
defaultValue=''
hideSelectedOptions={false}
removeSelected={false}
closeMenuOnSelect={false}
backspaceRemovesValue={false}
/>```
Explanation on Above Code ProportyNames on Above Code
Note: First Three Proporties are using this npm , remaning Propories are using React-Select
1. allOption
allOption={{
label: "Select All", // If u want Change ur Wish, like 'SelectAll States'
value: 0
}}
2. allowSelectAll={true/false}
*. true -> selectAll will be displayed
*. false -> selectAll will be hide
Note: best Option to use more than 2 items are available.
3. components={{ Option, MultiValue, ValueContainer }}
*. Options -> If U want to Have CheckBoxes With Label.
*. MultiValue -> This is Optional but if u have any Error use it.
*. ValueContainer -> If U want to Have +{number}more(Select Multiple Options-
-it shows first 2 options Only.., remanings are +{number} more).```