Android 侧滑优化 reviewed by hy
Showing
1 changed file
with
4 additions
and
1 deletions
@@ -90,6 +90,9 @@ export default class Product extends Component { | @@ -90,6 +90,9 @@ export default class Product extends Component { | ||
90 | }} | 90 | }} |
91 | onPress={() => { | 91 | onPress={() => { |
92 | this.props.onPressDelete && this.props.onPressDelete(rowData, rowID); | 92 | this.props.onPressDelete && this.props.onPressDelete(rowData, rowID); |
93 | + if (this.state.currentlyOpenSwipeable) { | ||
94 | + this.state.currentlyOpenSwipeable.recenter(); | ||
95 | + } | ||
93 | }} | 96 | }} |
94 | > | 97 | > |
95 | <Text style={{color: 'white', fontSize: 17, paddingLeft: 20}}>删除</Text> | 98 | <Text style={{color: 'white', fontSize: 17, paddingLeft: 20}}>删除</Text> |
@@ -119,7 +122,7 @@ export default class Product extends Component { | @@ -119,7 +122,7 @@ export default class Product extends Component { | ||
119 | let {yh_exposureData} = rowData.toJS(); | 122 | let {yh_exposureData} = rowData.toJS(); |
120 | 123 | ||
121 | 124 | ||
122 | - let buttons = editing?null: this.rightButtons(rowData, rowID); | 125 | + let buttons = editing? null: this.rightButtons(rowData, rowID); |
123 | return ( | 126 | return ( |
124 | <Swipeable | 127 | <Swipeable |
125 | rightButtons={buttons} | 128 | rightButtons={buttons} |
-
Please register or login to post a comment