|
3 | 3 | View, |
4 | 4 | Text, |
5 | 5 | Image, |
6 | | - Keyboard, |
7 | 6 | SectionList, |
8 | 7 | ActivityIndicator, |
9 | 8 | LayoutAnimation, |
|
38 | 37 | currentSwipeIndex: 0, |
39 | 38 | searchedEmployees: [], |
40 | 39 | screenState: 'normal', |
41 | | - isKeyboardShowing: false, |
42 | 40 | } |
43 | 41 | } |
44 | 42 |
|
|
55 | 53 | this.props.fetchEmployeesAndDepartments() |
56 | 54 | } |
57 | 55 | } |
58 | | - this.screenHeight = getHeight() |
59 | | - this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this._keyboardDidShow); |
60 | | - this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this._keyboardDidHide); |
61 | | - } |
62 | | - |
63 | | - _keyboardDidShow = () => { |
64 | | - // this.setState({isKeyboardShowing: true}); |
65 | | - } |
66 | | - |
67 | | - _keyboardDidHide = () => { |
68 | | - this.setState({isKeyboardShowing: false}); |
69 | 56 | } |
70 | 57 |
|
71 | 58 | _onSearchBarTextChange = (text) => { |
|
74 | 61 | } |
75 | 62 |
|
76 | 63 | _onSearchBarFocus = () => { |
77 | | - this.setState({isKeyboardShowing: true}); |
78 | 64 | this.timeout = setTimeout(() => { |
79 | 65 | this.setState({ isSearching: true }); |
80 | 66 | }, 300); |
|
182 | 168 |
|
183 | 169 | _renderSearchView = () => { |
184 | 170 | return ( |
185 | | - <View style={[style.searchViewContainer, {height: this.state.isKeyboardShowing ? this.screenHeight - 280 : this.screenHeight - 115}]}> |
| 171 | + <View style={style.searchViewContainer}> |
186 | 172 | <SearchContactView |
187 | 173 | data={this.state.searchedEmployees} |
188 | 174 | onPress={this._onCellSelection} |
189 | 175 | /> |
| 176 | + <KeyboardSpacer/> |
190 | 177 | </View> |
191 | 178 | ) |
192 | 179 | } |
|
0 commit comments