File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -209,11 +209,11 @@ const LightSearchBar = () => {
209209 const onChange = itemID => setValue ( itemID )
210210
211211 const shownOptions = ( ) => {
212- if ( ( writing || itemSearchQuery . loading ) && ! empty )
212+ if ( empty ) return [ ]
213+ if ( writing || itemSearchQuery . loading )
213214 return < Select . Option key = "Loading" > Loading...</ Select . Option >
214- if ( ! writing && options . length === 0 && ! empty )
215+ if ( ! writing && options . length === 0 )
215216 return < Select . Option key = "NoResult" > No results</ Select . Option >
216- if ( empty ) return [ ]
217217 else return options
218218 }
219219
Original file line number Diff line number Diff line change @@ -301,11 +301,10 @@ const SearchBar = () => {
301301 const onChange = useCallback ( itemID => setValue ( itemID ) , [ ] )
302302
303303 const shownOptions = ( ) => {
304- if ( writing && ! empty )
305- return < Select . Option key = "Loading" > Loading...</ Select . Option >
306- if ( ! writing && options . length === 0 && ! empty )
307- return < Select . Option key = "NoResult" > No results</ Select . Option >
308304 if ( empty ) return [ ]
305+ if ( writing ) return < Select . Option key = "Loading" > Loading...</ Select . Option >
306+ if ( ! writing && options . length === 0 )
307+ return < Select . Option key = "NoResult" > No results</ Select . Option >
309308 else return options
310309 }
311310
You can’t perform that action at this time.
0 commit comments