Skip to content

Commit 0125a2f

Browse files
author
石破天惊
authored
Merge pull request #90 from bolan9999/fix-keyboard
fix keyboardShouldPersistTaps
2 parents f7922a7 + 1ba9aec commit 0125a2f

File tree

5 files changed

+165
-152
lines changed

5 files changed

+165
-152
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"prop-types": "^15.6.0",
1111
"react": "^16.0.0",
1212
"react-native": "^0.50.4",
13-
"react-native-largelist": "^1.0.0",
13+
"react-native-largelist": "1.2.6",
1414
"react-native-swipeout": "^2.3.3"
1515
},
1616
"devDependencies": {

react-native-largelist/largelist/LargeList.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ class LargeList extends React.Component {
350350
style={{ flex: 1 }}
351351
contentContainerStyle={{ flex: 1 }}
352352
bounces={false}
353+
keyboardShouldPersistTaps={this.props.keyboardShouldPersistTaps}
353354
>
354355
<EventScrollView
355356
ref={ref => (this.scrollViewRef = ref)}

react-native-largelist/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-largelist",
3-
"version": "1.2.6",
3+
"version": "1.2.7",
44
"private": false,
55
"description": "The best performance large list component which is much better than SectionList for React Native.",
66
"author": "bolan9999 <[email protected]>",

samples/LargeListSample3.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
*/
99

1010
import React from "react";
11-
import { View, Text, Image } from "react-native";
11+
import { View, Text, Image, TextInput, TouchableOpacity } from "react-native";
1212
import { LargeList } from "../react-native-largelist";
13+
// import {LargeList} from "react-native-largelist";
1314
import { contacts as orgContracts } from "./DataSource";
1415
import { iconObject } from "./icons";
1516

@@ -34,6 +35,7 @@ class LargeListSample3 extends React.Component {
3435
renderCell={this.renderItem.bind(this)}
3536
heightForSection={() => 40}
3637
heightForCell={() => 60}
38+
keyboardShouldPersistTaps={'handled'}
3739
renderHeader={this.renderHeader.bind(this)}
3840
renderFooter={this.renderFooter.bind(this)}
3941
onRefresh={() => {
@@ -92,19 +94,16 @@ class LargeListSample3 extends React.Component {
9294
style={{ marginLeft: 16, width: 40, height: 40 }}
9395
source={this.contacts[section].info[row].icon}
9496
/>
97+
<TouchableOpacity onPress={()=>{}}>
9598
<Text style={{ fontSize: 16, marginLeft: 10 }}>
9699
{this.contacts[section].info[row].name}
97100
</Text>
101+
</TouchableOpacity>
98102
</View>
99-
<Text style={{ fontSize: 16, marginRight: 16 }}>
100-
{this.contacts[section].info[row].phone}
101-
</Text>
103+
<TextInput style={{ fontSize: 16, marginRight: 16,width:100 }} defaultValue={this.contacts[section].info[row].phone}>
104+
105+
</TextInput>
102106
</View>
103-
{/*{(row < this.contacts[section].info.length - 1 ||*/}
104-
{/*section === this.contacts.length - 1) &&*/}
105-
{/*<View*/}
106-
{/*style={{ backgroundColor: "#CCC", height: 1, marginLeft: 16 }}*/}
107-
{/*/>}*/}
108107
</View>
109108
);
110109
}

0 commit comments

Comments
 (0)