1.0.6 • Published 2 years ago

react-native-multiple-select-pro v1.0.6

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

react-native-multiple-select-pro

Select all options, single and multiple selectors. This package will provide you item search facility and delete selected facility.:v::sparkling_heart:

Screenshot a

Installation

Using Yarn:

yarn add react-native-multiple-select-pro
npm install react-native-multiple-select-pro

Usage

import * as React from 'react';
import { StyleSheet, View } from 'react-native';
import { MultiSelector } from 'react-native-multiple-select-pro';

export default function App() {
  const [data, setData] = React.useState([]);

  const DATASET = [
    {
      id: 1,
      title: 'sunt aut facere ',
    },
    {
      id: 2,
      title: 'qui est esse',
    },
    {
      id: 3,
      title: 'ea molestias quasi',
    },
    {
      id: 4,
      title: 'eum et est occaecati',
    },
    {
      id: 5,
      title: 'nesciunt quas odio',
    },
    {
      id: 6,
      title: 'dolorem eum magni',
    },
    {
      id: 7,
      title: 'magnam facilis autem',
    },
    {
      id: 8,
      title: 'dolorem dolore est ipsam',
    },
    {
      id: 9,
      title: 'nesciunt iure omnis',
    },
    {
      id: 10,
      title: 'optio molestias',
    },
  ];

  return (
    <View style={{ maxHeight: '50%' }}>
      <MultiSelector
        title="User Name"
        dataSet={DATASET}
        containerHeight="75%"
        txtColor={'white'}
        bgColor={'#00bbda'}
        buttonTxtColor={'white'}
        buttonBGColor={'#00bbda'}
        checkboxColor={'white'}
        buttonName="Done!"
        setData={setData}
        hideButtonBGColor={'#00bbda'}
        hideButtonTxtColor={'white'}
        inputBoxHeight={35}
      />
      {/* you could get all selected data in data state */}
      {console.log(data)}
    </View>
  );
}

If your DATASET is too large you must wrap MultiSelector by View with maxHeight="50%". You could manage total height with MaxHeight and containerHeight props.

<View style={{ maxHeight: '50%' }}>
  <MultiSelector >
</View>

Properties

PropTypeDescriptionDefault
dataSetArray[]dataSet you must input array data .required
titleStringLabel or titleSearch here
dataArrayyou will get selected result in date propnot-required
setDataArray[]Pass setState data in setData propsrequired callback
buttonNameStringName of buttonDone
checkboxColorStringColor of checkbox#00bbda
txtColorStringcolor of text of body elementwhite
buttonTxtColorStringText color of buttonwhite
buttonBGColorStringBackground color of button#00bbda
heightStringaccepted percentage of table height"60%"
bgColorStringBackground color of body element#00bbda
hideButtonBGColorStringHide button background color#00bbda
hideButtonTxtColorStringhide Button text Color#white
inputBoxHeightnumberHeight of InputBox35
containerHeightstringHeight of container accepte only percentage60%

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

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

0.1.10

2 years ago

0.1.9

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago