2019-04-17 18:57:46 +00:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
import SearchBox from '../../../containers/SearchBox';
|
|
|
|
import { isIOS } from '../../../utils/deviceInfo';
|
|
|
|
|
2019-11-25 20:01:17 +00:00
|
|
|
const SearchBar = React.memo(({ onChangeSearchText, inputRef }) => {
|
2019-04-17 18:57:46 +00:00
|
|
|
if (isIOS) {
|
2019-11-25 20:01:17 +00:00
|
|
|
return <SearchBox onChangeText={onChangeSearchText} inputRef={inputRef} testID='rooms-list-view-search' key='rooms-list-view-search' />;
|
2019-04-17 18:57:46 +00:00
|
|
|
}
|
|
|
|
return null;
|
|
|
|
});
|
|
|
|
|
|
|
|
SearchBar.propTypes = {
|
2019-11-25 20:01:17 +00:00
|
|
|
inputRef: PropTypes.func,
|
2019-04-17 18:57:46 +00:00
|
|
|
onChangeSearchText: PropTypes.func
|
|
|
|
};
|
|
|
|
|
|
|
|
export default SearchBar;
|