Fix bug in SpeciesColorPicker loading state
Oops, I made a fix to the color picker, but not the species picker! Updated them both to match.
This commit is contained in:
parent
f699d867e5
commit
6d05fb8680
1 changed files with 5 additions and 2 deletions
|
@ -216,8 +216,11 @@ function SpeciesColorPicker({
|
||||||
aria-label="Pet species"
|
aria-label="Pet species"
|
||||||
value={speciesId}
|
value={speciesId}
|
||||||
// We also wait for the valid pairs before enabling, so users can't
|
// We also wait for the valid pairs before enabling, so users can't
|
||||||
// trigger change events we're not ready for.
|
// trigger change events we're not ready for. Also, if the caller
|
||||||
isLoading={allSpecies.length === 0 || loadingValids}
|
// hasn't provided species and color yet, assume it's still loading.
|
||||||
|
isLoading={
|
||||||
|
allColors.length === 0 || loadingValids || !speciesId || !colorId
|
||||||
|
}
|
||||||
isDisabled={isDisabled || speciesIsDisabled}
|
isDisabled={isDisabled || speciesIsDisabled}
|
||||||
// Don't fade out in the speciesIsDisabled case; it's more like a
|
// Don't fade out in the speciesIsDisabled case; it's more like a
|
||||||
// read-only state.
|
// read-only state.
|
||||||
|
|
Loading…
Reference in a new issue