File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ import { postsUrl } from '../../lib/requests/routes.js.erb';
8
8
import Loading from '../Requests/Loading' ;
9
9
import Errored from '../Requests/Errored' ;
10
10
import { formattedTextForDate } from '../../lib/utils/wca' ;
11
+ import { IdWcaSearch } from "../SearchWidget/WcaSearch" ;
12
+ import SEARCH_MODELS from "../SearchWidget/SearchModel" ;
11
13
12
14
function PostTitlesList ( {
13
15
posts,
@@ -121,7 +123,10 @@ function PostsWidget({
121
123
{ ! loading && data && (
122
124
< div className = "posts-widget" >
123
125
{ titleOnly ? (
124
- < PostTitlesList posts = { data . posts } />
126
+ < >
127
+ < IdWcaSearch id = "foo-search" model = { SEARCH_MODELS . competition } value = { [ "FooComp" , "BazComp" ] } />
128
+ < PostTitlesList posts = { data . posts } />
129
+ </ >
125
130
) : (
126
131
< >
127
132
< PostsList posts = { data . posts } />
Original file line number Diff line number Diff line change @@ -74,7 +74,8 @@ export function IdWcaSearch({
74
74
} ) ,
75
75
} , WCA_SEARCH_QUERY_CLIENT ) ;
76
76
77
- const valueOptions = multiple ? fetchedOptions : fetchedOptions [ 0 ] ;
77
+ const filteredOptions = fetchedOptions . filter ( Boolean ) ;
78
+ const valueOptions = multiple ? filteredOptions : filteredOptions [ 0 ] ;
78
79
79
80
const onChangeIdOnly = useCallback ( ( evt , data ) => {
80
81
const { value : apiValues } = data ;
You can’t perform that action at this time.
0 commit comments