Closed ke4 closed 1 month ago
The logic that transform the Any
label when its value is ` is here: In the
scxa-gene-search-formin the
Autocomplete.js`
function _asyncFetchOptions (host, suggesterEndpoint, selectedSpecies, allSpecies) {
return async (inputValue) => {
const suggesterUrl = URI(suggesterEndpoint, host).search({
query: inputValue,
species: selectedSpecies || allSpecies.join(`,`)
}).toString()
const response = await fetch(suggesterUrl)
if (response.ok) {
return await response.json()
}
throw new Error(`${suggesterUrl} => ${response.status}`)
}
}
the line:
species: selectedSpecies || allSpecies.join(`,`)
is responsible for it, but for returning all species selectedSpecies
should be undefined
or empty.
In the initial state of the search component the species's value is not empty, but Any
. So, we probably need to change it to empty in the that component.
I think we probably have to change the initial value of the Species
dropdown in the search.jsp
where we define initial values for the search form.
I am going to test my theory locally.
Yes. My test worked. It was enough to change the value from Any
to ` in the
search.jsp`.
From:
defaultSpecies: `Any`,
To:
defaultSpecies: ``,
Tested on test
and staging
env.
In the Single Cell Expression Atlas the gene search on the homepage initially using
Any
as a value for the request parameter forspecies
. In case of thespecies
dropdown set toAny
, the request parameter should contains all the species's value and not a singleAny
value.Workaround to fix the search:
Species
dropdown.Any
value from theSpecies
dropdown.