内容へ移動
猫型iPS細胞研究所
ユーザ用ツール
ログイン
サイト用ツール
検索
ツール
文書の表示
以前のリビジョン
バックリンク
最近の変更
メディアマネージャー
サイトマップ
ログイン
>
最近の変更
メディアマネージャー
サイトマップ
現在位置:
INDEX
»
reactnative
»
react-native-swipeout
トレース:
reactnative:react-native-swipeout
この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。
====== react-native-swipeout ====== [[https://www.npmjs.com/package/react-native-swipeout|react-native-swipeout]] <code> <FlatList data={this.state.data} execData={this.state.update} renderItem={({item}) => <Swipeout autoClose={true} sectionID={item.rowid} rowID={item.rowid} right={[{text:'DELETE',backgroundColor:'red', onPress:()=>this.swipeDelete(item.rowid)}]} onOpen={(sectionID, rowId, direction)=>this.swipeOpen(sectionID, rowId, direction)}> <View> <Text style={{fontSize:20}}>{item.question}:{item.answer}</Text> </View> </Swipeout> } /> </code> {{:reactnative:pasted:20190210-165905.png}} ====== deleteしたあと引き出したDELETEが残る ====== <html>autoClose={true}</html>を追加したら解消した。 引き出しのアクションを複数つける <code> <Swipeout sectionID={item.key} rowID={item.name} right={[ { text:'done',backgroundColor:'blue' , onPress:()=>this.swipeDone() }, //ボタンは複数つけることができる { text:'delete',backgroundColor:'red', onPress:()=>this.swipeDelete() } ]} onOpen={(sectionID, rowId, direction)=>this.swipeOpen(sectionID, rowId, direction)}> <View> <Text style={{fontSize:20}}>{item.name}</Text> </View> </Swipeout> </code> {{:reactnative:pasted:20190210-170208.png}}
reactnative/react-native-swipeout.txt
· 最終更新: 2019/02/10 17:02 by
ips
ページ用ツール
文書の表示
以前のリビジョン
バックリンク
文書の先頭へ