marouanekadiri/Accordion-Collapse-react-native

first child of header isExpanded is not changing when clicked

Opened this issue · 0 comments

const _head = (item , index , isExpanded) => {
return(
<CollapseHeader style={{ marginVertical:5, borderWidth:1, flexDirection:'row',
paddingHorizontal:5, borderRadius:5, borderColor:global.BtnColor , paddingVertical:5 ,flexDirection:'row'}}>
<View style={{ width:'90%',}}>

       <Text style={{fontFamily:'roboto',fontSize:18, color:colors.text, fontWeight:'700' }}>{item.heading}</Text> 
           
    
  </View>
  <Icon
     size={30}
     color= {colors.text}
     name={ isExpanded ? 'ios-arrow-down': 'ios-arrow-up'}
     style={{alignSelf:'center'}}
   />
    </CollapseHeader>
    
    );
  } 

<AccordionList
disabled = {true}
isCollapsed = {true}
bounces={false}
//onToggle={(item, index , isExpanded) => onToggle_covered(item, index , isExpanded)}
list={myhtml}
header={_head}
body={_body}
/>