Skip to content

Commit

Permalink
Merge pull request #90 from bolan9999/fix-keyboard
Browse files Browse the repository at this point in the history
fix keyboardShouldPersistTaps
  • Loading branch information
石破天惊 authored Feb 22, 2018
2 parents f7922a7 + 1ba9aec commit 0125a2f
Show file tree
Hide file tree
Showing 5 changed files with 165 additions and 152 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"prop-types": "^15.6.0",
"react": "^16.0.0",
"react-native": "^0.50.4",
"react-native-largelist": "^1.0.0",
"react-native-largelist": "1.2.6",
"react-native-swipeout": "^2.3.3"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions react-native-largelist/largelist/LargeList.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ class LargeList extends React.Component {
style={{ flex: 1 }}
contentContainerStyle={{ flex: 1 }}
bounces={false}
keyboardShouldPersistTaps={this.props.keyboardShouldPersistTaps}
>
<EventScrollView
ref={ref => (this.scrollViewRef = ref)}
Expand Down
2 changes: 1 addition & 1 deletion react-native-largelist/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-largelist",
"version": "1.2.6",
"version": "1.2.7",
"private": false,
"description": "The best performance large list component which is much better than SectionList for React Native.",
"author": "bolan9999 <[email protected]>",
Expand Down
17 changes: 8 additions & 9 deletions samples/LargeListSample3.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
*/

import React from "react";
import { View, Text, Image } from "react-native";
import { View, Text, Image, TextInput, TouchableOpacity } from "react-native";
import { LargeList } from "../react-native-largelist";
// import {LargeList} from "react-native-largelist";
import { contacts as orgContracts } from "./DataSource";
import { iconObject } from "./icons";

Expand All @@ -34,6 +35,7 @@ class LargeListSample3 extends React.Component {
renderCell={this.renderItem.bind(this)}
heightForSection={() => 40}
heightForCell={() => 60}
keyboardShouldPersistTaps={'handled'}
renderHeader={this.renderHeader.bind(this)}
renderFooter={this.renderFooter.bind(this)}
onRefresh={() => {
Expand Down Expand Up @@ -92,19 +94,16 @@ class LargeListSample3 extends React.Component {
style={{ marginLeft: 16, width: 40, height: 40 }}
source={this.contacts[section].info[row].icon}
/>
<TouchableOpacity onPress={()=>{}}>
<Text style={{ fontSize: 16, marginLeft: 10 }}>
{this.contacts[section].info[row].name}
</Text>
</TouchableOpacity>
</View>
<Text style={{ fontSize: 16, marginRight: 16 }}>
{this.contacts[section].info[row].phone}
</Text>
<TextInput style={{ fontSize: 16, marginRight: 16,width:100 }} defaultValue={this.contacts[section].info[row].phone}>

</TextInput>
</View>
{/*{(row < this.contacts[section].info.length - 1 ||*/}
{/*section === this.contacts.length - 1) &&*/}
{/*<View*/}
{/*style={{ backgroundColor: "#CCC", height: 1, marginLeft: 16 }}*/}
{/*/>}*/}
</View>
);
}
Expand Down
Loading

0 comments on commit 0125a2f

Please sign in to comment.