How to openRow (leftSwipe) dynamically in react native

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


How to openRow (leftSwipe) dynamically in react native



I am using react-native-base to swipable list. As per the code below, Every row will have "md-remove-circle" icon and I want to open row (leftSwipe) by clicking on the "md-remove-circle" icon. It is possible to openRow dynamically by function call ?


<List
dataSource={this.ds.cloneWithRows(this.state.listViewData)}
renderRow={ (data, secId, rowId, rowMap) =>

<ListItem style={{borderBottomWidth: 1,marginLeft: 0, backgroundColor : data.rowBg}}>

<Left>
{
this.state.rmvCircle &&

<Icon onPress={()=>this.openCurrenRow()} style={{color:'red'}} name="md-remove-circle" />
}

<TouchableOpacity onPress={()=>this.redir(data)}>
<Text>
{data.text}
</Text>
</TouchableOpacity>
</Left>
</ListItem>}


renderRightHiddenRow={(data, secId, rowId, rowMap) =>
<Button
full
danger
onPress={_ => this.clearNotificationPrompt(secId, rowId, rowMap, data.logId,'single')}
style={{
flex: 1,
alignItems: "center",
justifyContent: "center"
}}
>
<Icon active name="trash" />
</Button>}
leftOpenValue={this.state.leftOpenValue}
rightOpenValue={this.state.rightOpenValue}
/>









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Visual Studio Code: How to configure includePath for better IntelliSense results

C++ virtual function: Base class function is called instead of derived