title: How to implement multiselect using Flatlist in react native?
body: <p>I am trying to create a flatlist with text,but it selects only single value but i want to select multiple values from the list.  and i also need color change for selected item. Here i am fetching data from api.
  Here is my code:</p>
  
  <pre><code>import React from "react";
  import PropTypes from "prop-types";
  import { connect } from "react-redux";    
  import { FlatList } from "react-native";
  import {
  stepDone,
  setInputData,
  } from "../../actions";
  import Options from "../../components/Options";&lt;----- It is a component Here define the flatlist
  
  class Qualifier extends React.Component {
  
  _afterQualifierSelected = (id, name) =&gt; {
  const { stepDone, setInputData, input, updateSymptom } = this.props,
    symptomId = input.symptomIds[input.symptomIds.length - 1],
    currentSymptom = input.symptoms.filter(entry =&gt; entry.id === symptomId),
    symptom = currentSymptom ? currentSymptom[0] : {};
  
  symptom.qualifier = id;
  
  setInputData("qualifier", { id, name });
  stepDone("qualifierSelected");
  };
  
  render = () =&gt; {
  return (
        &lt;Options
           data={this.qualifiers}
           exclusive={true}
           onSelect={this._afterQualifierSelected}
        /&gt;
  )
  }
  }
  </code></pre>
  
  <p>options.js</p>
  
  <pre><code> export default class Options extends React.PureComponent {
   static propTypes = {
   data: PropTypes.array.isRequired,
   extraData: PropTypes.object,
   exclusive: PropTypes.bool.isRequired,
   onSelect: PropTypes.func.isRequired,
   onDone: PropTypes.func
  };
  
    _keyExtractor = (item, index) =&gt;
     "undefined" === typeof item.id
    ? index.toString()
    : "string" === typeof item.id
    ? item.id
    : item.id.toString();
  
   _renderItem = ({ item }) =&gt; {
  const { onSelect } = this.props;
  return &lt;Item id={item.id} text={item.name} onPress={onSelect} /&gt;;
   };
  
  render = () =&gt; {
  const { data, extraData, exclusive, onDone } = this.props;
  return (
    &lt;View style={styles.container}&gt;
      &lt;View style={styles.listContainer}&gt;
        &lt;FlatList
          data={data}
          extraData={extraData}
          keyExtractor={this._keyExtractor}
          renderItem={this._renderItem}
        /&gt;
      &lt;/View&gt;
      {!exclusive &amp;&amp; (
        &lt;Button
          style={styles.done}
          onPress={onDone}
          title={Language.done}
          accessibilityLabel={Language.optionsDoneAccessibility}
        /&gt;
      )}
    &lt;/View&gt;
  );
  };
  }
  </code></pre>
  
  <p>How should i implement multi select in this flat list using react native?
  Can somebody help me to solve this issue?</p>