react-native-contacts
Advanced tools
Comparing version 5.0.3 to 5.0.4
@@ -34,3 +34,4 @@ /** | ||
this.state = { | ||
contacts: [] | ||
contacts: [], | ||
searchPlaceholder: "Search" | ||
}; | ||
@@ -60,2 +61,6 @@ } | ||
}); | ||
Contacts.getCount(count => { | ||
this.setState({ searchPlaceholder: `Search ${count} contacts` }); | ||
}); | ||
} | ||
@@ -97,3 +102,6 @@ | ||
</View> | ||
<SearchBar onChangeText={this.search} /> | ||
<SearchBar | ||
searchPlaceholder={this.state.searchPlaceholder} | ||
onChangeText={this.search} | ||
/> | ||
<ScrollView style={{ flex: 1 }}> | ||
@@ -100,0 +108,0 @@ {this.state.contacts.map(contact => { |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "5.0.3", | ||
"version": "5.0.4", | ||
"description": "React Native Contacts (android & ios)", | ||
@@ -10,0 +10,0 @@ "nativePackage": true, |
@@ -110,8 +110,9 @@ ![react-native-contacts](https://github.com/rt2zz/react-native-contacts/raw/master/example/logo.png) | ||
3. register module (in MainApplication.java) | ||
3. register module | ||
```java | ||
// MainApplication.java | ||
import com.rt2zz.reactnativecontacts.ReactNativeContacts; // <--- import | ||
public class MainActivity extends ReactActivity { | ||
public class MainApplication extends Application implements ReactApplication { | ||
...... | ||
@@ -118,0 +119,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
8848981
11982
367