title: React-native expandable flatlist. Close opened item when opening another
body: <p>I got a expandable flatList working, but im need to close an existing tab when another tab are opening.</p>
  
  <pre><code>  const [expandable, setExpandable] = useState(false);
    const [titleColor, setTitleColor] = useState(colors.blue.primary)
  
    const onPress = () =&gt; {
      if (!expandable) {
        setExpandable(true);
        setTitleColor(colors.blue.secondary);
      }
      else {
        setExpandable(false);
        setTitleColor(colors.blue.primary);
      }
    };
  
    return (
      &lt;StyledView&gt;
        &lt;TouchableWithoutFeedback onPress={onPress}&gt;
          &lt;StyledListItem {...props}&gt;
            &lt;ListTitle style={{ color: titleColor }}&gt;{title}&lt;/ListTitle&gt;
            &lt;Icon name="add" size={24} color={titleColor} /&gt;
          &lt;/StyledListItem&gt;
        &lt;/TouchableWithoutFeedback&gt;
        {expandable &amp;&amp; &lt;MyListDetails faqDetail={details} /&gt;}
        &lt;StyledLine&gt;&lt;/StyledLine&gt;
      &lt;/StyledView&gt;
    );
  }
  </code></pre>
  
  <p>I need to save state of my open tab and close them, but i dont know how can i do that. Someone can help me? Thx!!!</p>