uncontrol simple search inputs
This commit is contained in:
@@ -278,7 +278,7 @@ export function SearchablePeopleList({
|
||||
) : null}
|
||||
</View>
|
||||
|
||||
<View style={[, web([a.pt_xs])]}>
|
||||
<View style={[web([a.pt_xs])]}>
|
||||
<SearchInput
|
||||
inputRef={inputRef}
|
||||
value={searchText}
|
||||
|
||||
@@ -82,11 +82,7 @@ export function StepFeeds({moderationOpts}: {moderationOpts: ModerationOpts}) {
|
||||
<ScreenTransition style={[a.flex_1]} direction={state.transitionDirection}>
|
||||
<View style={[a.border_b, t.atoms.border_contrast_medium]}>
|
||||
<View style={[a.py_sm, a.px_md, {height: 60}]}>
|
||||
<SearchInput
|
||||
value={query}
|
||||
onChangeText={t => setQuery(t)}
|
||||
onClearText={() => setQuery('')}
|
||||
/>
|
||||
<SearchInput defaultValue={query} onChangeText={setQuery} />
|
||||
</View>
|
||||
</View>
|
||||
<List
|
||||
|
||||
@@ -66,11 +66,7 @@ export function StepProfiles({
|
||||
<ScreenTransition style={[a.flex_1]} direction={state.transitionDirection}>
|
||||
<View style={[a.border_b, t.atoms.border_contrast_medium]}>
|
||||
<View style={[a.py_sm, a.px_md, {height: 60}]}>
|
||||
<SearchInput
|
||||
value={query}
|
||||
onChangeText={setQuery}
|
||||
onClearText={() => setQuery('')}
|
||||
/>
|
||||
<SearchInput defaultValue={query} onChangeText={setQuery} />
|
||||
</View>
|
||||
</View>
|
||||
<List
|
||||
|
||||
@@ -155,10 +155,10 @@ export function FeedsScreen(_props: Props) {
|
||||
[setQuery, refetchPopularFeeds, debouncedSearch, resetSearch],
|
||||
)
|
||||
const onPressCancelSearch = React.useCallback(() => {
|
||||
setQuery('')
|
||||
refetchPopularFeeds()
|
||||
resetSearch()
|
||||
}, [refetchPopularFeeds, setQuery, resetSearch])
|
||||
}, [refetchPopularFeeds, resetSearch])
|
||||
|
||||
const onSubmitQuery = React.useCallback(() => {
|
||||
debouncedSearch(query)
|
||||
}, [query, debouncedSearch])
|
||||
@@ -481,7 +481,7 @@ export function FeedsScreen(_props: Props) {
|
||||
<FeedsAboutHeader />
|
||||
<View style={{paddingHorizontal: 12, paddingBottom: 4}}>
|
||||
<SearchInput
|
||||
value={query}
|
||||
defaultValue={query}
|
||||
onChangeText={onChangeQuery}
|
||||
onClearText={onPressCancelSearch}
|
||||
onSubmitEditing={onSubmitQuery}
|
||||
|
||||
Reference in New Issue
Block a user