Add room search

This commit is contained in:
Diego Sampaio 2017-08-09 13:21:28 -03:00
parent e01a2d0aaf
commit abc77dc253
No known key found for this signature in database
GPG Key ID: E060152B30502562
3 changed files with 24 additions and 1 deletions

5
.expo/packager-info.json Normal file
View File

@ -0,0 +1,5 @@
{
"expoServerPort": null,
"packagerPort": null,
"packagerPid": null
}

9
.expo/settings.json Normal file
View File

@ -0,0 +1,9 @@
{
"hostType": "tunnel",
"lanType": "ip",
"dev": true,
"strict": false,
"minify": false,
"urlType": "exp",
"urlRandomness": null
}

View File

@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { View, FlatList, StyleSheet } from 'react-native';
import { View, FlatList, StyleSheet, TextInput } from 'react-native';
import realm from '../lib/realm';
import RocketChat from '../lib/meteor';
@ -51,6 +51,15 @@ export default class RoomsListView extends React.Component {
render() {
return (
<View style={styles.container}>
<View>
<TextInput
style={styles.searchBox}
value={this.state.text}
onChangeText={text => this.setState({ text })}
returnKeyType='search'
placeholder='Search'
/>
</View>
<FlatList
style={styles.list}
data={this.state.dataSource}