mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-14 16:12:40 +03:00
Remove close button for search in community modal
This commit is contained in:
parent
f398de90b1
commit
d8d59ac6a3
@ -11,13 +11,11 @@ import SelectCommunityModalView from '../view/selectCommunityModalView';
|
||||
import {
|
||||
fetchCommunities,
|
||||
fetchCommunitiesSuccess,
|
||||
fetchCommunitiesFail,
|
||||
fetchSubscribedCommunities,
|
||||
fetchSubscribedCommunitiesSuccess,
|
||||
fetchSubscribedCommunitiesFail,
|
||||
} from '../../../../redux/actions/communitiesAction';
|
||||
|
||||
const SelectCommunityModalContainer = ({ onPressCommunity, onPressCloseForSearch }) => {
|
||||
const SelectCommunityModalContainer = ({ onPressCommunity }) => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const [searchedCommunities, setSearchedCommunities] = useState([]);
|
||||
@ -77,7 +75,6 @@ const SelectCommunityModalContainer = ({ onPressCommunity, onPressCloseForSearch
|
||||
topCommunities={topCommunities}
|
||||
subscribedCommunities={subscribedCommunities}
|
||||
onChangeSearch={debounce(handleChangeSearch, 500)}
|
||||
onPressCloseForSearch={handlePressCloseForSearch}
|
||||
searchedCommunities={searchedCommunities}
|
||||
showSearchedCommunities={showSearchedCommunities}
|
||||
/>
|
||||
|
@ -19,12 +19,7 @@ const SelectCommunityModalView = ({
|
||||
}) => {
|
||||
return (
|
||||
<ScrollView style={{ flex: 1 }} showsVerticalScrollIndicator={false}>
|
||||
<SearchInput
|
||||
handleOnModalClose={onPressCloseForSearch}
|
||||
onChangeText={onChangeSearch}
|
||||
placeholder="search"
|
||||
autoFocus={false}
|
||||
/>
|
||||
<SearchInput onChangeText={onChangeSearch} placeholder="search" autoFocus={false} />
|
||||
{showSearchedCommunities ? (
|
||||
<FlatList
|
||||
ItemSeparatorComponent={() => <Separator />}
|
||||
|
@ -8,7 +8,7 @@ export default EStyleSheet.create({
|
||||
height: 44,
|
||||
borderRadius: 8,
|
||||
padding: 5,
|
||||
justifyContent: 'center',
|
||||
justifyContent: 'flex-start',
|
||||
marginHorizontal: 16,
|
||||
},
|
||||
icon: {
|
||||
|
@ -34,6 +34,7 @@ const SearchInputView = ({
|
||||
autoFocus={autoFocus}
|
||||
editable={editable}
|
||||
/>
|
||||
{handleOnModalClose && (
|
||||
<IconButton
|
||||
iconStyle={styles.closeIcon}
|
||||
iconType="Ionicons"
|
||||
@ -41,6 +42,7 @@ const SearchInputView = ({
|
||||
name="ios-close-circle-outline"
|
||||
onPress={() => handleOnModalClose()}
|
||||
/>
|
||||
)}
|
||||
</SafeAreaView>
|
||||
);
|
||||
|
||||
|
@ -280,10 +280,7 @@ class EditorScreen extends Component {
|
||||
presentationStyle="pageSheet"
|
||||
style={styles.modal}
|
||||
>
|
||||
<SelectCommunityModalContainer
|
||||
onPressCommunity={this._handlePressCommunity}
|
||||
onPressCloseForSearch={() => this.setState({ isCommunitiesListModalOpen: false })}
|
||||
/>
|
||||
<SelectCommunityModalContainer onPressCommunity={this._handlePressCommunity} />
|
||||
</Modal>
|
||||
<BasicHeader
|
||||
handleDatePickerChange={(date) => handleDatePickerChange(date, fields)}
|
||||
|
Loading…
Reference in New Issue
Block a user